简体   繁体   English

'pip install pymongo'停止工作

[英]'pip install pymongo' stopped working

What do I do wrong? 我做错了什么?

Traceback (most recent call last):
  File "/usr/local/bin/pip", line 9, in <module>
    load_entry_point('pip==7.1.0', 'console_scripts', 'pip')()
  File "/usr/local/lib/python3.4/dist-packages/setuptools-18.1-    py3.4.egg/pkg_resources/__init__.py", line 558, in load_entry_point
  File "/usr/local/lib/python3.4/dist-packages/setuptools-18.1-py3.4.egg/pkg_resources/__init__.py", line 2682, in load_entry_point
  File "/usr/local/lib/python3.4/dist-packages/setuptools-18.1-py3.4.egg/pkg_resources/__init__.py", line 2355, in load
  File "/usr/local/lib/python3.4/dist-packages/setuptools-18.1-py3.4.egg/pkg_resources/__init__.py", line 2361, in resolve
ImportError: No module named 'pip'

Stackoverflow asked me to type more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more Stackoverflow要求我输入越来越多越来越多越来越多的越来越多

Try to fix pip installation with: 尝试使用以下方法修复点子安装:

sudo apt-get install python3-pip

I've had the same issue and this worked for me. 我遇到了同样的问题,这对我有用。 Maybe it's because you only installed pip for an earlier version of python or you intalled it from source and not from you distributions package management. 也许是因为您只为早期版本的python安装了pip,或者是从源代码而不是从分发软件包管理中安装了pip。

It sounds like your pip variable isn't set or you're trying to use conflicting environments. 听起来您的pip变量未设置,或者您尝试使用有冲突的环境。 If you want to get the python package pymongo installed on your 3.4 version look to use: 如果要在3.4版本上安装python软件包pymongo,请使用:

/usr/local/bin/pip3.4 install pymongo

Then you can verify by testing in the 3.4 interpreter by running: 然后,您可以通过运行以下命令在3.4解释器中进行验证:

python3.4
>>>import pymongo
>>>

In the future look at using virtualenvs, they can be really easy and clean to work with while controlling your packages neatly. 在将来使用virtualenvs的时候,它们可以非常容易和干净地使用,同时可以整洁地控制您的软件包。 Hope this helps! 希望这可以帮助!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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