| View previous topic :: View next topic |
| Author |
Message |
greyspoke n00b

Joined: 08 Jan 2010 Posts: 65
|
Posted: Sun Apr 29, 2012 4:06 pm Post subject: Python 3 emerge fail |
|
|
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 |
|
 |
yngwin Developer


Joined: 19 Dec 2002 Posts: 4389 Location: Suzhou, China
|
Posted: Mon Apr 30, 2012 4:02 pm Post subject: |
|
|
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 |
|
 |
rh1 Guru


Joined: 10 Apr 2010 Posts: 495
|
Posted: Mon Apr 30, 2012 4:34 pm Post subject: |
|
|
| Maybe you just need to run python-updater first. |
|
| Back to top |
|
 |
greyspoke n00b

Joined: 08 Jan 2010 Posts: 65
|
Posted: Mon Apr 30, 2012 7:31 pm Post subject: |
|
|
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 |
|
 |
|