Bug 592623 - Setuptools Site Module Already Imported
Setuptools Site Module Already Imported
Product: Fedora
Classification: Fedora
Component: python-setuptools (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: Toshio Ernie Kuratomi
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2010-05-15 15:14 EDT by Devan Goodwin
Modified: 2010-05-16 13:34 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2010-05-16 12:52:40 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Devan Goodwin 2010-05-15 15:14:27 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):


How reproducible:

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

Actual results:

Stack trace above.

Additional info:

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.
Comment 1 Toshio Ernie Kuratomi 2010-05-16 12:52:40 EDT
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.
Comment 2 Devan Goodwin 2010-05-16 13:34:24 EDT
My mistake I had no idea I had a manually installed setuptools, thank you for the help.

Note You need to log in before you can comment on or make changes to this bug.