无法识别 VS Code Python pip

新手上路,请多包涵

我刚从 PyCharm 切换到 VSCode,当我尝试 pip install X 时,我收到以下消息:

 pip : The term 'pip' is not recognized as the name of a cmdlet, function,
script file, or operable program. Check the spelling of the name, or if a
path was included, verify that the path is correct and try again.
At line:1 char:1
+ pip install discord
+ ~~~
    + CategoryInfo          : ObjectNotFound: (pip:String) [], CommandNotFoun
   dException
    + FullyQualifiedErrorId : CommandNotFoundException

我已经更新了 PATH,当我在命令提示符下执行“echo %PATH%”时,我得到与我的 PyCharm PATH 目录完全相同的目录。为什么 VSCode 不工作,而 PyCharm 工作完美?

我在 cmd 上的路径:“C:\Users\USERNAME\AppData\Local\Programs\Python\Python37-32\Scripts”

原文由 yucecoder 发布,翻译遵循 CC BY-SA 4.0 许可协议

阅读 1.2k
1 个回答

尝试使用 python -m pip 而不是 pip

原文由 wakonda56 发布,翻译遵循 CC BY-SA 4.0 许可协议

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题
logo
Stack Overflow 翻译
子站问答
访问
宣传栏