每次我运行`pip`来安装任何软件包时,它都会向我显示警告[重复]
Posted
技术标签:
【中文标题】每次我运行`pip`来安装任何软件包时,它都会向我显示警告[重复]【英文标题】:Every time I run `pip` to install any package, it shows me warnings [duplicate] 【发布时间】:2021-11-25 00:45:25 【问题描述】:我在pip
运行后和pip
完成执行后立即收到这些警告:
这里是文本:
C:\Users\Raj Panpaliya> pip install pygame
WARNING: Ignoring invalid distribution -pencv-python (c:\users\raj panpaliya\appdata\local\programs\python\python37\lib\site-packages)
WARNING: Ignoring invalid distribution -mi (c:\users\raj panpaliya\appdata\local\programs\python\python37\lib\site-packages)
WARNING: Ignoring invalid distribution -pencv-python (c:\users\raj panpaliya\appdata\local\programs\python\python37\lib\site-packages)
WARNING: Ignoring invalid distribution -mi (c:\users\raj panpaliya\appdata\local\programs\python\python37\lib\site-packages)
Requirement already satisfied: pygame in c:\users\raj panpaliya\appdata\local\programs\python\python37\lib\site-packages (1.9.6)
WARNING: Ignoring invalid distribution -pencv-python (c:\users\raj panpaliya\appdata\local\programs\python\python37\lib\site-packages)
WARNING: Ignoring invalid distribution -mi (c:\users\raj panpaliya\appdata\local\programs\python\python37\lib\site-packages)
WARNING: Ignoring invalid distribution -pencv-python (c:\users\raj panpaliya\appdata\local\programs\python\python37\lib\site-packages)
WARNING: Ignoring invalid distribution -mi (c:\users\raj panpaliya\appdata\local\programs\python\python37\lib\site-packages)
WARNING: Ignoring invalid distribution -pencv-python (c:\users\raj panpaliya\appdata\local\programs\python\python37\lib\site-packages)
WARNING: Ignoring invalid distribution -mi (c:\users\raj panpaliya\appdata\local\programs\python\python37\lib\site-packages)
C:\Users\Raj Panpaliya>
【问题讨论】:
你运行的是哪个版本的python? 能否发布您的 Python 版本? ***.com/q/67442661/10237506的可能重复 【参考方案1】:当pip
删除一个包时,它首先用-
重命名第一个字母。例如,opencv-python
变为 -pencv-python
。如果卸载失败,重命名的目录会保留在那里,但它是无效的。
您可能必须手动删除这些文件夹,以抑制警告。
【讨论】:
以上是关于每次我运行`pip`来安装任何软件包时,它都会向我显示警告[重复]的主要内容,如果未能解决你的问题,请参考以下文章