简体   繁体   English

为什么我不能使用任何 PIP 命令? 麦克和康达

[英]Why can I not use any PIP commands? Mac & Conda

Pip Commands suddenly not working... Pip 命令突然不起作用...

I have used Python for various projects in the past.我过去曾在各种项目中使用过 Python。 I suspected that it might be a path issue, but my pwd outputs Users/MyUserName/ .我怀疑这可能是路径问题,但我的pwd输出Users/MyUserName/

When I enter even a basic PIP command such as pip --version in the console, I get the following error:当我在控制台中输入基本的 PIP 命令(例如pip --version时,我收到以下错误:

Traceback (most recent call last):
  File "/Users/MyUserName/anaconda3/bin/pip", line 11, in <module>
    sys.exit(main())
TypeError: 'module' object is not callable

Appreciate all the responses!感谢所有的回应! Turns out it had to do with me having Python both within and without the Conda "shell".事实证明,这与我在 Conda “shell”内外都拥有 Python 有关系。 Using conda in place of pip seems to work!使用conda代替pip似乎有效!

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

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