Loading... # 引言 最近发现了一款比较厉害的script,能够下载好多网站上的音乐,虽然文档上说也可以下载视频,emm,没有试过,咳咳,言归正传,我在运行pip安装第三方库的时候,总是爆出警告,虽然用着没有什么影响吧,但是强迫症的我感觉很烦躁。后来呢想pip好久没更新了,更新也出了问题。。。 # 症状 ```bash C:\Users\alc>python -m pip install --upgrade pip WARNING: Ignoring invalid distribution -umpy (d:\software\microsoft visual studio\shared\python37_64\lib\site-packages) WARNING: Ignoring invalid distribution -ip (d:\software\microsoft visual studio\shared\python37_64\lib\site-packages) WARNING: Ignoring invalid distribution -ensorflow-gpu (d:\software\microsoft visual studio\shared\python37_64\lib\site-packages) WARNING: Ignoring invalid distribution -umpy (d:\software\microsoft visual studio\shared\python37_64\lib\site-packages) WARNING: Ignoring invalid distribution -ip (d:\software\microsoft visual studio\shared\python37_64\lib\site-packages) WARNING: Ignoring invalid distribution -ensorflow-gpu (d:\software\microsoft visual studio\shared\python37_64\lib\site-packages) Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Requirement already satisfied: pip in d:\software\microsoft visual studio\shared\python37_64\lib\site-packages (21.1.1) WARNING: Ignoring invalid distribution -umpy (d:\software\microsoft visual studio\shared\python37_64\lib\site-packages) WARNING: Ignoring invalid distribution -ip (d:\software\microsoft visual studio\shared\python37_64\lib\site-packages) WARNING: Ignoring invalid distribution -ensorflow-gpu (d:\software\microsoft visual studio\shared\python37_64\lib\site-packages) WARNING: Ignoring invalid distribution -umpy (d:\software\microsoft visual studio\shared\python37_64\lib\site-packages) WARNING: Ignoring invalid distribution -ip (d:\software\microsoft visual studio\shared\python37_64\lib\site-packages) WARNING: Ignoring invalid distribution -ensorflow-gpu (d:\software\microsoft visual studio\shared\python37_64\lib\site-packages) WARNING: Ignoring invalid distribution -umpy (d:\software\microsoft visual studio\shared\python37_64\lib\site-packages) WARNING: Ignoring invalid distribution -ip (d:\software\microsoft visual studio\shared\python37_64\lib\site-packages) WARNING: Ignoring invalid distribution -ensorflow-gpu (d:\software\microsoft visual studio\shared\python37_64\lib\site-packages) ``` # 解决方案 找到python路径,删除提示的那些损坏的包 例如我的是:D:\Software\Microsoft Visual Studio\Shared\Python37_64\Lib\site-packages 进去之后有一些"~"前缀的文件夹,干掉就好了。 ![image.png](https://www.zunmx.top/usr/uploads/2021/05/1313774101.png) # 过程 1. 关闭所有的python文件 2. pip更新,当时的终端给关了,没有存留记录,更新之后下载可以下载但是诡异的是卸载后拒绝访问,大概是提示的这样子的错误,然后pip就不能用了。尬。 > [Could not install packages due to an EnvironmentError: [WinError 5] ] 3. 离线安装pip,稀里糊涂的各种install,最后也就好了,仿佛遇到了玄学问题 © 允许规范转载 打赏 赞赏作者 支付宝微信 赞 如果觉得我的文章对你有用,请随意赞赏