简体   繁体   中英

ImportError: No module named pkg_resources after I upgrade python from 2.6.6 to 2.7.3

When I run pip install xxx or easy_install xxx , I met this problem after upgrading Python from 2.6.6 to 2.7.3:

Traceback (most recent call last):
File "/usr/bin/pip", line 5, in <module>
from pkg_resources import load_entry_point
ImportError: No module named pkg_resources

Could someone give me some advice ?

first try to run python26 or python27 to see what happening.

check if setting PYTHONPATH in shell. unset it!

or set it PYTHONPATH=/usr/lib/python2.7:/usr/lib/python2.7/site-packages/

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM