Originally reported by: flyte (Bitbucket: flyte, GitHub: flyte)
I'm sorry in advance for a vague bug report, but I'm not able to reproduce this on a blank VM. I have a server which had setuptools 7.0 on, which got upgraded using the ez_setup.py script to setuptools 8.0.2. After this, the following happens:
$ easy_install --version
Traceback (most recent call last):
File "/usr/local/bin/easy_install", line 9, in <module>
load_entry_point('setuptools==8.0.2', 'console_scripts', 'easy_install')()
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 351, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2363, in load_entry_point
return ep.load()
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2088, in load
entry = __import__(self.module_name, globals(),globals(), ['__name__'])
File "build/bdist.linux-x86_64/egg/setuptools/command/easy_install.py", line 42, in <module>
File "build/bdist.linux-x86_64/egg/setuptools/archive_util.py", line 15, in <module>
ImportError: cannot import name ContextualZipFile
If I pip uninstall setuptools and pip install setuptools==7.0 then easy_install --version works correctly.
I also have another issue running egg_info on this box but I can't recreate this problem on a blank VM either, so I'm inclined to think that it's caused by the same issue:
$ python setup.py egg_info
running egg_info
error: Invalid distribution name or version syntax: my-pkg-0.0.1dev
This command works with the same project on a blank VM running setuptools 8.0.2.
_Original comment by_ jaraco (Bitbucket: jaraco, GitHub: jaraco):
This issue looks like a duplicate of #252. Do let me know if you believe it's distinct from that issue.
The issue with egg_info does appear to be something else, though maybe related. I'm hoping after reading #252, you'll find a workaround for the failing environment you have and then we'll know if the egg-info issue is also solved. If not, please file a separate ticket for it.
pip uninstall setuptools
pip install setuptools
it works on ubuntu
Most helpful comment
pip uninstall setuptools
pip install setuptools
it works on ubuntu