So i trying install setuptools on a new server, so i got with
wget http://pypi.python.org/packages/2.7/s/setuptools/setuptools-0.6c11-py2.7.egg
and trying to sh setuptools-0.6c11-py2.7.egg in the directory where the file is located and I get
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: No module named setuptools.command.easy_install
I couldn’t find any way of debugging this anywhere.
When I try
import sys
from setuptools.command.easy_install import bootstrap
sys.exit(bootstrap())
I get
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named setuptools.command.easy_install
When I enter sys.path in python interpreter it gives me the following:
['', '/opt/python2.7/lib/python27.zip', '/opt/python2.7/lib/python2.7', '/opt/python2.7/lib/python2.7/plat-linux3', '/opt/python2.7/lib/python2.7/lib-tk', '/opt/python2.7/lib/python2.7/lib-old', '/opt/python2.7/lib/python2.7/lib-dynload', '/opt/python2.7/lib/python2.7/site-packages']
You could try a few different things:
move the file to a different directory, cd to the same directory, and again try running
sh setuptools-0.6c11-py2.7.egg.Open the python2.7 interactive prompt (just run
python2.7) in the same directory as where the file resides. Then run:to attempt the installation manually
If that still doesn’t work, run
python2.7and run the following python code, and add the information shown to your question:Last but not least, test that the downloaded egg was not somehow corrupted or truncated. Test for the md5 hash and size:
If they don’t match, redownload the file and try again.