Results 1 to 8 of 8

Thread: Python3 broken in OpenSuse 13.1

  1. #1

    Default Python3 broken in OpenSuse 13.1

    Summary: sys module has no member lib

    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.

  2. #2

    Default AW: Python3 broken in OpenSuse 13.1

    Quote Originally Posted by sswaney View Post
    Summary: sys module has no member lib

    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.
    Version 3.3.2 as included in openSUSE 13.1 works fine here:
    Code:
    # python3
    Python 3.3.2 (default, Jun 13 2013, 16:05:31) [GCC] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    >>>
    And yes, line 24 looks like this:
    Code:
            'stdlib': '{installed_base}/'+sys.lib+'/python{py_version_short}',
    Are you doing anything special to get this crash?

    Do you have python3 installed as well? Or only python3-base?

  3. #3

    Default Re: Python3 broken in OpenSuse 13.1

    Python3 and Python3-base are both installed.

    Just re-installed Python 3.3.3-96.1-i586 from vendor obs://build.opensuse.org/devel:languagesython
    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?)

  4. #4
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    20,395
    Blog Entries
    1

    Default Re: Python3 broken in OpenSuse 13.1

    Quote Originally Posted by sswaney View Post

    (an aside: is there a way to turn off those stinking smileys?)
    Yes, please use [CODE]...[/CO..] tags when posting console output.

  5. #5

    Default Re: Python3 broken in OpenSuse 13.1

    Quote Originally Posted by deano_ferrari View Post
    Yes, please use [CODE]...[/CO..] tags when posting console output.
    Ah, thanks for the hint! Although, for the record, the offending part was regular typed text ( devel:languagesython )

  6. #6

    Default Re: Python3 broken in OpenSuse 13.1

    Quote Originally Posted by sswaney View Post
    Ah, thanks for the hint! Although, for the record, the offending part was regular typed text ( devel:languagesython )
    There's a checkbox "deactivate graphical smilies" below the text editor, or you can enclose the offending text with [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 devel:languages:python yet.
    Did you switch back all python3-* packages?

    But I'm on 64bit. I will try the 32bit packages later.

  7. #7

    Default Re: Python3 broken in OpenSuse 13.1

    Quote Originally Posted by wolfi323 View Post
    But I'm on 64bit. I will try the 32bit packages later.
    Well, I tried it now on a 32bit 13.1 system and python3 works fine there as well (3.3.2 as included).

    So it must be something on your system.

    Maybe a mixture of packages?
    Code:
    rpm -qa | grep python3
    Maybe there are some files left from your self-compiled python that are used instead of the system's ones?

  8. #8

    Default Re: Python3 broken in OpenSuse 13.1 - SOLVED

    Fascinating.

    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!

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •