Powershell显示“ObjectNotFound”

2024-10-01 19:33:09 发布

您现在位置:Python中文网/ 问答频道 /正文

enter image description here

我试图使用“pyautigui”,但使用了“pip”命令,但powershell无法识别它。 我收到了以下信息:

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 pyautogui
+ ~
    + CategoryInfo          : ObjectNotFound: (pip:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException 

如何解决此问题


Tags: piporofthepathname命令信息
1条回答
网友
1楼 · 发布于 2024-10-01 19:33:09

在Windows中pip应添加到PATH环境变量中。可能的方法是:

  • 安装时,选中将python添加到路径
  • 首先找到pip.exe的路径,它通常位于python安装的Scripts目录中。然后复制文件路径并从Cmd运行setx %PATH% "%PATH%;FULL PATH"

相关问题 更多 >

    热门问题