无法识别VS Code Python点

时间:2020-04-19 20:53:17

标签: python visual-studio-code pip

我刚刚从PyCharm切换到VSCode,并且当我尝试点安装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上的PATH:“ C:\ Users \ USERNAME \ AppData \ Local \ Programs \ Python \ Python37-32 \ Scripts”

2 个答案:

答案 0 :(得分:0)

尝试使用python -m pip代替pip

答案 1 :(得分:0)

如果您有一个conda环境设置,请尝试

conda install pip

至少对我有用。