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

Original: https://blog.csdn.net/qq_34474071/article/details/122703839
Author: CA-CA
Title: pip install安装软件包报错:Requirement already satisfied

原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/732298/

转载文章受原作者版权保护。转载请注明原作者出处!

(0)

大家都在看

亲爱的 Coder【最近整理,可免费获取】👉 最新必读书单  | 👏 面试题下载  | 🌎 免费的AI知识星球