简体   繁体   中英

python3.4 pip ImportError: No Module named 'pkg_resources'

pip is not working in my python3.4

$ pip install django
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'
$ pip
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'

How do I fix this? What's the problem? Thanks

i just ran into the same error, here is what i've done to fix it:

sudo apt-get remove --purge python-pkg-resources

sudo apt-get install ubuntu-desktop

尝试> sudo pip install django <我认为应该做得好,然后我怀疑您的pip搞砸了,所以尝试sudo apt-get install --reinstall python-pkg-resources,但是如果您使用的是Python 3,则可能需要进行调整以确保您设置了Python 3环境而不是默认的P2环境,请参见此处,了解有关如何将pip与Python 3.x和Python 2.x一起使用的更多信息。

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