Error building Python 2.6.3 and 2.6.4rc2

M

Michael Ströder

HI!

I'm on a openSUSE system where Python 2.6 is installed from RPMs.
I'm trying to build Python from source separately. This used to work in former
versions but fails now (see build traceback below).

Anyone having a clue what's going on here? Is there a possible work-around? A
possible conflict with the openSUSE-RPMs?

Ciao, Michael.

----------------------------- 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
 
M

Michael Ströder

Christian said:
Michael said:
----------------------------- 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.

Many thanks for the hint! Removing the file
/usr/lib/python2.6/site-packages/_local.pth made the build working but
SetupTools are no longer working then.

The file looks like this (single line wrapped here):

--------------------------- snip ---------------------------
import site; import sys; site.addsitedir('/usr/local/' + sys.lib + '/python' +
sys.version[:3] + '/site-packages',set())
--------------------------- snip ---------------------------

Ciao, Michael.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top