主要是由於網絡原因,國外鏡像常通過https,連接失敗導致,先說結論:
通過命令指定下載地址,
一、https網絡問題
pip install -i http://mirrors.aliyun.com/pypi/simple/ pyecharts --trusted-host mirrors.aliyun.com
同時加上版本,還可以卸載之前的版本,安裝指定的版本
pip install -i http://mirrors.aliyun.com/pypi/simple/ pyecharts==0.1.9.4 --trusted-host mirrors.aliyun.com
試過的方法,均未解決,可能是我的環境問題,待以後驗證:
1、全局取消證書驗證
import ssl
ssl._create_default_https_context = ssl._create_unverified_context
2、修改配置
C:\Users\xx\.condarc中添加
channels:
- http://mirrors.aliyun.com/pypi/simple/
- https://pypi.tuna.tsinghua.edu.cn/simple/
show_channel_urls: true
3、發請求時將驗證失效
\Lib\site-packages\pip-19.1.1-py3.6.egg\pip\_vendor\requests\adapters.py
def send(self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None):
下插入
verify=False
二、It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial
如果確信沒問題,可以在pip命令後加上--ignore-installed表示忽略已經安裝的庫
如下:
pip install -i http://mirrors.aliyun.com/pypi/simple/ virtualenv --trusted-host mirrors.aliyun.com --ignore-installed
參考 :https://blog.csdn.net/sinat_28442665/article/details/86651609
https://blog.csdn.net/yixieling4397/article/details/79861379