Trouble with SetupTools using Python 2.6 on Windows

I was trying to install python-twitter using Python 2.6 on Windows. The library claims it depends on simplejson, but the latter indicates that it is a backward-compatibility library for Python 2.5 and below, implying it isn’t needed in 2.6. I attempted to install it anyway, and I got the following error message:

C:UserstimmDownloadssimplejson-2.1.1>python install
   UserWarning: Module site was already imported from C:Python26libsite.pyc, but
   c:python26libsite-packages is being added to sys.path
Traceback (most recent call last):
 File "", line 103, in <module> run_setup(True)
 File "", line 99, in run_setup cmdclass={'build_ext': ve_build_ext},
 File "", line 113, in setup_setup_distribution = dist = klass(attrs)
 File "", line 223, in __init__
 File "", line 270, in __init__ self.finalize_options()
 File "", line 256, in finalize_options
 File "", line 1918, in load
 parts = []
ImportError: <module 'setuptools.dist' from
   has no 'check_packages' attribute

Ignoring this and attempting to install python-twitter without it seemed to lead to it attempting to satisfy the dependency and hitting the same error message within the python-twitter install script.

I eventually hit on the fix on the page describing how to install easy_install on Windows: I had an existing (but apparently not entirely working) install of setuptools already. I went into C:Python26Libsite-packages and deleted setuptools*.egg and setuptools.pth and ran the Windows .exe installer. After that, installing python-twitter according to the instructions worked.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre lang="" line="" escaped="" cssfile="">