I am trying to use easy_install
on ubuntu 14-04, but running fails due to a missing dependency on setuptools 3.3
$ easy_install
Traceback (most recent call last):
File "/usr/local/bin/easy_install", line 5, in <module>
from pkg_resources import load_entry_point
...
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 839, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'setuptools==3.3' distribution was not found and is required by the application
If I list what I have installed with pip
, I can see that I have setuptools 17.1.1
installed
$ pip list | grep setuptools
setuptools (17.1.1)
I looked at the source for easy_install
, and it's really simple.
#!/usr/bin/python
# EASY-INSTALL-ENTRY-SCRIPT: 'setuptools==3.3','console_scripts','easy_install'
__requires__ = 'setuptools==3.3'
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
sys.exit(
load_entry_point('setuptools==3.3', 'console_scripts', 'easy_install')()
)
I then edited the file, and replaced all mentioned of setuptools==3.3
with setuptools=17.1.1
#!/usr/bin/python
# EASY-INSTALL-ENTRY-SCRIPT: 'setuptools==17.1.1','console_scripts','easy_install'
__requires__ = 'setuptools==17.1.1'
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
sys.exit(
load_entry_point('setuptools==17.1.1', 'console_scripts', 'easy_install')()
)
It now works - but clearly that doesn't feel like the right way to fix the problem!
Questions
- Is this a bug with
easy_install
? - Am I able to upgrade
easy_install
to resolve this? - When I added the
pip
tag to this question, I see that it's listed as a replacement foreasy_install
. Am I able to replaceeasy_install
withpip
and it should just work?