I have python2.7.6 installed on mac, also pip. But when trying to get pip version or run it, it has error.
Here is output from my mac:
$ which python
/Library/Frameworks/Python.framework/Versions/2.7/bin/python
$ which pip
/Library/Frameworks/Python.framework/Versions/2.7/bin/pip
$ python -V
Python 2.7.6
$ pip --version
Traceback (most recent call last):
File "/usr/local/bin/pip", line 5, in <module>
from pkg_resources import load_entry_point
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2793, in <module>
working_set.require(__requires__)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 673, in require
needed = self.resolve(parse_requirements(requirements))
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 576, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: pip==1.3.1
Any idea?
This error is happening because you have the Mac OSX python intact but you have removed the Python folder from library . Just set the path in ~/.bash_profile for Mac OSX python and it will be resolved.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.