uirement already satisfied的问题当我们用pip install + 库名时,出现了下面
Requirement already satisfied WARNING: Ignoring invalid distribution -ip 的问题
对于这样的问题,解决办法就是在 pip install 后加 - -target=你所要添加的库文件地址(注意:target前为两个-,并且没有空格) 再加 库名
一般来说地址就是错误提示后的这串地址
示例代码:
pip install --target=d:\python\lib\site-packages Django
pip install --target=h:\users\29187\appdata\local\programs\python\python37\lib\site-packages requests
如果还有问题 可以备份改文件夹下 d:\python\lib\site-packages波浪线开头的文件夹,然后删除
~ip-20.2.dist-info 备份删除
~ip 备份删除
假如继续输出:Collecting xlwt
Using cached xlwt-1.3.0-py2.py3-none-any.whl (99 kB)
Installing collected packages: xlwt
Successfully installed xlwt-1.3.0
WARNING: Target directory d:\anaconda\lib\site-packages\xlwt already exists. Specify --upgrade to force replacement.
WARNING: Target directory d:\anaconda\lib\site-packages\xlwt-1.3.0.dist-info already exists. Specify --upgrade to force replacement.
解决办法:在原本代码的末端加上“ --upgrade”,注
输入:pip install --target=d:\anaconda\lib\site-packages xlwt --upgrade