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 setup.py install C:Python26libsite-packagessetuptools-0.6c9-py2.6.eggsetuptoolscommandsdist.py:4: 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 "setup.py", line 103, in <module> run_setup(True) File "setup.py", line 99, in run_setup cmdclass={'build_ext': ve_build_ext}, File "C:Python26libdistutilscore.py", line 113, in setup_setup_distribution = dist = klass(attrs) File "buildbdist.win32eggsetuptoolsdist.py", line 223, in __init__ File "C:Python26libdistutilsdist.py", line 270, in __init__ self.finalize_options() File "buildbdist.win32eggsetuptoolsdist.py", line 256, in finalize_options File "buildbdist.win32eggpkg_resources.py", line 1918, in load parts = [] ImportError: <module 'setuptools.dist' from 'C:Python26libsite-packagessetuptools-0.6c9-py2.6.eggsetuptoolsdist.pyc'> 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.