通过pip安装Python软件包?

时间:2019-10-23 11:05:37

标签: python windows powershell package

我正在尝试安装python软件包pyperclip。

我已经尝试这样做了一段时间,但它根本无法正常工作。这是我尝试过的(来自Internet上的其他答案):

  • 打开Windows Powershell,将目录更改为我安装Python的目录。该文件的位置如下: C:\ Users \ Jamie \ AppData \ Local \ Programs \ Python \ Python37 \ Scripts

  • 输入了命令pip install pyperclip。我收到以下错误消息: pip:术语'pip'不被识别为cmdlet,函数,脚本文件或可运行程序的名称。检查 拼写名字,或者如果包含路径,请验证路径是否正确,然后重试。 我也从Powershell得到以下建议: Suggestion [3,General]: The command pip was not found, but does exist in the current location. Windows PowerShell does not load commands from the current location by default. If you trust this command, instead type: ".\pip". See "get-help about_Command_Precedence" for more details.

  • 输入了命令python -m pip install pyperclip。在这里,什么都没有发生。我没有收到任何错误消息,但仍然无法在Python IDLE中导入该软件包。

我不知道该怎么办?任何帮助表示赞赏。

已解决:我在cmd而不是PowerShell上运行了相同的命令,并且可以正常工作。不过不知道为什么。

0 个答案:

没有答案