简体   繁体   English

尝试安装模块时出现pip错误

[英]Pip error when trying to install module

I'm trying to install PyDrive [a wrapper library of the google drive api for python] and pip is giving me this error. 我正在尝试安装PyDrive [适用于python的Google驱动器api的包装库],pip给了我这个错误。 It did the same thing when trying to install things like matplotlib or mega.py [a mega.nz api for python]. 尝试安装matplotlib或mega.py [适用于python的mega.nz api]之类的东西时,它所做的事情相同。

Here's the error: 这是错误: 在此处输入图片说明

Anyone got a clue what's going on? 任何人都知道发生了什么事吗?

Cheers 干杯

You could try renaming that pip.py to something else. 您可以尝试将pip.py重命名为其他名称。

There is a library called pip somewhere on your system (and it may also be bundled within pip.exe). 系统上的某个地方有一个叫做pip的库(它也可能捆绑在pip.exe中)。 That is different from the "entry point" script that actually runs pip from the command line. 这与实际上从命令行运行pip的“入口点”脚本不同。 When you run pip, it will try to import the library called pip. 运行pip时,它将尝试导入名为pip的库。 If there is a script called pip.py in the Scripts directory (representing the entry-point script, not the library), it may import that instead of the real library. 如果在Scripts目录中有一个名为pip.py的脚本(表示入口点脚本,而不是库),则可能会导入该脚本而不是实际库。 If this is indeed the problem, renaming pip.py to something else will remove the name conflict and allow pip to properly import the library it needs. 如果确实存在问题,将pip.py重命名为其他名称将消除名称冲突,并允许pip正确导入所需的库。

I'm not sure how you wound up with pip.py in your Scripts directory in the first place. 我不确定您如何首先在Scripts目录中使用pip.py。 I don't think it should be there. 我不认为它应该在那里。 My Python installation on Windows doesn't have it. 我在Windows上安装的Python没有安装。

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

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