Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be available on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 592623 - Setuptools Site Module Already Imported
Summary: Setuptools Site Module Already Imported
Alias: None
Product: Fedora
Classification: Fedora
Component: python-setuptools
Version: 13
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Toshio Ernie Kuratomi
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2010-05-15 19:14 UTC by Devan Goodwin
Modified: 2010-05-16 17:34 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2010-05-16 16:52:40 UTC
Type: ---

Attachments (Terms of Use)

Description Devan Goodwin 2010-05-15 19:14:27 UTC
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 16:52:40 UTC
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 17:34:24 UTC
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.