Red Hat Bugzilla – Bug 592623
Setuptools Site Module Already Imported
Last modified: 2010-05-16 13:34:24 EDT
Description of problem:
Building some packages with setuptools in F13 an error surfaces:
/usr/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/command/sdist.py:4: UserWarning: Module site was already imported from /usr/lib64/python2.6/site.pyc, but /usr/lib/python2.6/site-packages is being added to sys.path
Traceback (most recent call last):
File "setup.py", line 51, in <module>
'Programming Language :: Python'
File "/usr/lib64/python2.6/distutils/core.py", line 113, in setup
_setup_distribution = dist = klass(attrs)
File "/usr/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/dist.py", line 223, in __init__
File "/usr/lib64/python2.6/distutils/dist.py", line 270, in __init__
File "/usr/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/dist.py", line 256, in finalize_options
File "/usr/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/pkg_resources.py", line 1918, in load
while parts and parts[-1]=='00000000':
ImportError: <module 'setuptools.dist' from '/usr/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/dist.py'> has no 'check_packages' attribute
Version-Release number of selected component (if applicable):
Depends on the package being built but happens every time on those packages.
Steps to Reproduce:
1. git clone git://github.com/dgoodwin/tito.git
2. python setup.py bdist
Stack trace above.
This gentoo thread helped me find a workaround (see last comment):
Commenting out ./setuptools-0.6c9-py2.6.egg in /usr/lib/python2.6/site-packages/easy-install.pth fixes the issue for me.
This is not a bug in Fedora; it's a problem with a locally installed setuptools on your system.
If you do:
rpm -qf /usr/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg
You'll find out that no Fedora package is providing the problematic module. Similarly, the easy-install.pth is either being installed or modified by the locally installed setuptools.
My mistake I had no idea I had a manually installed setuptools, thank you for the help.