Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Python 3 emerge fail
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
greyspoke
n00b
n00b


Joined: 08 Jan 2010
Posts: 65

PostPosted: Sun Apr 29, 2012 4:06 pm    Post subject: Python 3 emerge fail Reply with quote

Recently updated Python went from 3.2.2 to 3.2.3. The emerge failed at the last gasp
Code:

PT PaX marking -m
     python
INFO (postinst)

Compilation and optimization of Python modules placed outside of site-packages directories for CPython 3.2 ...
ERROR (postinst)

Syntax errors / warnings in Python modules placed outside of site-packages directories for CPython 3.2:
    Fatal Python error: Py_Initialize: Unable to get the locale encoding
    File "/usr/lib/python2.7/encodings/__init__.py", line 123
    raise CodecRegistryError,                            ^
    SyntaxError: invalid syntax


Fortunately, Python 2 still works and indeed recompiled fine. Now, what is Python 3 doing apparently trying to initialise itself with stuff in the Python 2 directories? I have looked at the __init__.py scripts for both versions and they are differently syntaxed(?) at around that line. Just to deal with the obvious, I have USE_PYTHON="2.7" in my make.conf and eselect python list says this:
Code:
Available Python interpreters:
  [1]   python2.7 *
  [2]   python3.2

Sure enough python 3 does not therefore work for similar looking reasons:
Code:
 ~ $ python3
Fatal Python error: Py_Initialize: Unable to get the locale encoding
  File "/usr/lib/python2.7/encodings/__init__.py", line 123
    raise CodecRegistryError,\
                            ^
SyntaxError: invalid syntax
Aborted

Is this a problem at all as Python 3 does not seem to be used by much? I am sure this is not the first update of python 3 that has occurred, but it is the first where this has happened. And now downgrading to python 3.2.2-r1 or 3.2.2 results in the same issue arising???
Back to top
View user's profile Send private message
yngwin
Developer
Developer


Joined: 19 Dec 2002
Posts: 4389
Location: Suzhou, China

PostPosted: Mon Apr 30, 2012 4:02 pm    Post subject: Reply with quote

Do you really need python 3? If not, just remove it.
_________________
"Those who deny freedom to others deserve it not for themselves." - Abraham Lincoln
Free Culture | Defective by Design | EFF
Back to top
View user's profile Send private message
rh1
Guru
Guru


Joined: 10 Apr 2010
Posts: 495

PostPosted: Mon Apr 30, 2012 4:34 pm    Post subject: Reply with quote

Maybe you just need to run python-updater first.
Back to top
View user's profile Send private message
greyspoke
n00b
n00b


Joined: 08 Jan 2010
Posts: 65

PostPosted: Mon Apr 30, 2012 7:31 pm    Post subject: Reply with quote

There's a thought rh... but no still no worky.

May as well get rid of it as it is no use as it is. Funny thing is why it suddenly started this, it is the 2nd or 3rd version of python 3 that has been installed and the first time it has complained, yet now the previous versions don't install either.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum