Just installed python 3.3.3 on opensuse. getting a crash at startup:
[16:18] <stiv> File “/usr/lib/python3.3/sysconfig.py”, line 24, in <module>
[16:18] <stiv> ‘stdlib’: ‘{installed_base}/’+sys.lib+’/python{py_version_short}’,
[16:18] <stiv> AttributeError: ‘module’ object has no attribute ‘lib’
This happens with Python 3.3.2 from the regular repo and Python 3.3.3 from devel: language: python.
Building Python 3.3.3 from source works just fine. That line in sysconfig.py from source distribution looks like this:
‘stdlib’: ‘{installed_base}/lib/python{py_version_short}’,
I note there is a bug in the python.org bugtracker about this from a year ago, along with a patch.
Just re-installed Python 3.3.3-96.1-i586 from vendor obs://build.opensuse.org/devel:languages:python
Result running ‘python3’ in an xterm:
Traceback (most recent call last):
File “/usr/lib/python3.3/site.py”, line 611, in <module>
main()
File “/usr/lib/python3.3/site.py”, line 596, in main
known_paths = addusersitepackages(known_paths)
File “/usr/lib/python3.3/site.py”, line 278, in addusersitepackages
user_site = getusersitepackages()
File “/usr/lib/python3.3/site.py”, line 254, in getusersitepackages
user_base = getuserbase() # this will also set USER_BASE
File “/usr/lib/python3.3/site.py”, line 243, in getuserbase
from sysconfig import get_config_var
File “/usr/lib/python3.3/sysconfig.py”, line 24, in <module>
‘stdlib’: ‘{installed_base}/’+sys.lib+’/python{py_version_short}’,
AttributeError: ‘module’ object has no attribute ‘lib’
Installing Python 3.3.2-5.1.3.i586 from vendor openSuse gives a similar result:
…
File “/usr/lib/python3.3/sysconfig.py”, line 24, in <module>
‘stdlib’: ‘{installed_base}/’+sys.lib+’/python{py_version_short}’,
AttributeError: ‘module’ object has no attribute ‘lib’
As mentioned, building and installing from the python.org sources works fine.
It appears the i586 32-bit versions of python3 are broken in the 13.1 release.
(an aside: is there a way to turn off those stinking smileys?)
There’s a checkbox “deactivate graphical smilies” below the text editor, or you can enclose the offending text with [noparse][noparse]…[/noparse ][/noparse] tags.
Regarding your python problem:
As I said, the version included in openSUSE 13.1 works fine here. Haven’t tried the version from [noparse]devel:languages:python[/noparse] yet.
Did you switch back all python3-* packages?
But I’m on 64bit. I will try the 32bit packages later.
I had the problem before I built py 3 from source. For 13.1, I formatted the root partition and did a clean install to make sure old cruft from previous upgrades was gone.
There are a bunch of other py3 packages installed - stuff like pip, setup tools, etc., but no dups of py 3 and py 3-base.
I appreciate your help in this matter, wolfi323. The whole thing is rather puzzling, but I’m glad it is not a problem with the 13.1 distribution.
And thanks for the “disable smilies” hint. Didn’t see that!
UPDATE:
Before hitting ‘Submit’, I decided to delete python3-EVERYTHING via YAST and re-install minimum py3. No joy. So, to be thorough, I deleted all AND blew away the /usr/lib/python3.3 and /usr/lib/libpython3* . No py3 anywhere!
After re-installing, it WORKS… both 3.3.2 and 3.3.3. Go figure!
Definitely something local, possibly some old shared lib. Still a bit of a mystery. I very much appreciate your help chasing down the problem. Thanks!