-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
ImportError: No module named setuptools (add details to docs) #1064
Comments
Just ran into this installing supervisor via the Opscode recipe. Any workarounds?
|
yes, see the solution section in the description. |
Jannis asked us to work the text from the description into the docs to make it more likely to be found |
added a cookbook entry for this: |
…um/?hl=en&lnk=gcimh#!topic/fitbit-api/ii4pUt4uTNM) which broke my login sequence. Ran into some problems updating via pip -U, [fixed](pypa/pip#1064)
En same error again!!!!!!!!!!!!!!!!!!!! UBUNTU 15.10 python --version sudo pip install pip -I ...successfully installed pip-8.1.0 sudo pip install setuptools ...Sucessfully ..... setuptools-20.2.2 sudo pip install protobuf -I ...Could not .. |
fixed by apt-get install --reinstall python-setuptools |
Users are getting "ImportError: No module named setuptools" when using pip to upgrade a package since
distribute-0.7.3
was released.e.g. when running a command like this:
pip install --upgrade pyramid
Solution
To prevent the problem in new environments (that aren't broken yet),
pip install -U setuptools
,pip install --upgrade pyramid
)To fix the problem once it's occurred, you'll need to manually install the new setuptools, then rerun the upgrade that failed.
ez_setup.py
(https://bitbucket.org/pypa/setuptools/downloads/ez_setup.py)python ez_setup.py
pip install --upgrade pyramid
)Also note that pip-1.4 (unreleased) has fixes to prevent this
Cause
distribute-0.7.3 is just an empty wrapper that only serves to require the new setuptools (setuptools>=0.7) so that it will be installed. (if you don't know yet, the "new setuptools" is a merge of distribute and setuptools back into one project)
distribute-0.7.3 does it's job well, when the upgrade is done in isolation. E.g. if you're currently on distribute-0.6.X, then running
pip install -U setuptools
works fine to upgrade you to setuptools>=0.7.The problem occurs when:
As part of the upgrade process, pip builds an install list that ends up including distribute-0.7.3 and setuptools>=0.7 , but they can end up being separated by other dependencies in the list, so what can happen is this:
Note that pip-1.4 (unreleased) has fixes to prevent this. distribute-0.7.3 (or setuptools>=0.7) by themselves cannot prevent this kind of problem.
The text was updated successfully, but these errors were encountered: