Error building Python 2.6.3 and 2.6.4rc2

Christian Heimes lists at cheimes.de
Sat Oct 24 20:48:22 CEST 2009


Michael Ströder wrote:
> ----------------------------- snip -----------------------------
> /usr/src/Python-2.6.4rc2> make
> 'import site' failed; use -v for traceback
> Traceback (most recent call last):
>   File "./setup.py", line 15, in <module>
>     from distutils.command.build_ext import build_ext
>   File "/usr/src/michael/Python-2.6.4rc2/Lib/distutils/command/build_ext.py",
> line 13, in <module>
>     from site import USER_BASE, USER_SITE
>   File "/usr/src/michael/Python-2.6.4rc2/Lib/site.py", line 513, in <module>
>     main()
>   File "/usr/src/michael/Python-2.6.4rc2/Lib/site.py", line 496, in main
>     known_paths = addsitepackages(known_paths)
>   File "/usr/src/michael/Python-2.6.4rc2/Lib/site.py", line 288, in
> addsitepackages
>     addsitedir(sitedir, known_paths)
>   File "/usr/src/michael/Python-2.6.4rc2/Lib/site.py", line 185, in addsitedir
>     addpackage(sitedir, name, known_paths)
>   File "/usr/src/michael/Python-2.6.4rc2/Lib/site.py", line 155, in addpackage
>     exec line
>   File "<string>", line 1, in <module>
> AttributeError: 'module' object has no attribute 'lib'
> make: *** [sharedmods] Error 1


You have a broken or malformed .pth file on your system. Add a line with
"print fullname, line" right before "exec line" to debug your issue.

Christian



More information about the Python-list mailing list