pip install安装软件包报错:Requirement already satisfied
Posted CA-CA
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了pip install安装软件包报错:Requirement already satisfied相关的知识,希望对你有一定的参考价值。
报错信息:
C:\\Users\\13512>pip install pygame
Requirement already satisfied: pygame in c:\\users\\13512\\appdata\\local\\programs\\python\\python39\\lib\\site-packages (2.1.2)
原因分析:
需要指定路径
解决方案:
使用 pip install --target=安装路径
如:pip install --target=c:\\users\\13512\\appdata\\local\\programs\\python\\python39\\lib\\site-packages pygame
注意:--target=后紧跟安装路径无需空格
执行结果:
C:\\Users\\13512>pip install --target=c:\\users\\13512\\appdata\\local\\programs\\python\\python39\\lib\\site-packages pygame
Collecting pygame
Using cached pygame-2.1.2-cp39-cp39-win_amd64.whl (8.4 MB)
Installing collected packages: pygame
Successfully installed pygame-2.1.2
可使用 pip list 查看是否成功安装
C:\\Users\\13512>pip list
Package Version
----------------- -------
asttokens 2.0.5
backcall 0.2.0
black 21.12b0
click 8.0.3
colorama 0.4.4
decorator 5.1.1
et-xmlfile 1.1.0
executing 0.8.2
ipython 8.0.1
jedi 0.18.1
matplotlib-inline 0.1.3
mypy-extensions 0.4.3
openpyxl 3.0.9
parso 0.8.3
pathspec 0.9.0
pickleshare 0.7.5
pip 21.3.1
platformdirs 2.4.1
prompt-toolkit 3.0.24
pure-eval 0.2.1
pygame 2.1.2
Pygments 2.11.2
setuptools 57.4.0
six 1.16.0
stack-data 0.1.4
tomli 1.2.3
traitlets 5.1.1
typing_extensions 4.0.1
wcwidth 0.2.5
pip install 报错
问题描述,在使用pip安装django相关软件包时,提示错误如下:
[[email protected] install]# pip install django==1.6 Downloading/unpacking django==1.6 Cannot fetch index base URL https://pypi.python.org/simple/ Could not find any downloads that satisfy the requirement django==1.6 Cleaning up... No distributions at all found for django==1.6 Storing debug log for failure in /root/.pip/pip.log
解决方案:使用国内镜像
加上参数"-i http://pypi.v2ex.com/simple",即换成国内镜像
[[email protected] install]# pip install django==1.6 -i http://pypi.v2ex.com/simple Downloading/unpacking django==1.6 Real name of requirement django is django http://pypi.v2ex.com/simple/django/1.6 uses an insecure transport scheme (http). Consider using https if pypi.v2ex.com has it available http://pypi.v2ex.com/simple/django/ uses an insecure transport scheme (http). Consider using https if pypi.v2ex.com has it available Downloading Django-1.6-py2.py3-none-any.whl (6.7MB): 6.7MB downloaded Installing collected packages: django Successfully installed django Cleaning up... [[email protected] install]#
以上是关于pip install安装软件包报错:Requirement already satisfied的主要内容,如果未能解决你的问题,请参考以下文章