使用pip安装matplotlib

失败:

    >python -m pip install --user matplotlib.whl   #本地安装失败

    >pip install matplotlib  #超时

成功:

    pip install -i https://pypi.tuna.tsinghua.edu.cn/simple some-package

    pip install -i https://pypi.tuna.tsinghua.edu.cn/simple matplotlib

参考:https://mirrors.tuna.tsinghua.edu.cn/help/pypi/

内容如下:

pypi 镜像使用帮助

pypi 镜像每 5 分钟同步一次。
临时使用

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple some-package

注意,simple 不能少, 是 https 而不是 http
设为默认

升级 pip 到最新的版本 (>=10.0.0) 后进行配置:

pip install pip -U
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple

 

posted on 2019-02-21 16:20  winecork  阅读(414)  评论(0编辑  收藏  举报

导航