赞
踩
环境配置,下载速度慢,只有几十kb,看别的博客尝试换清华源什么的命令,换完之后总是有一些问题,下载失败什么的,如下图
Looking in indexes: http://pypi.tuna.tsinghua.edu.cn/simple
WARNING: The repository located at pypi.tuna.tsinghua.edu.cn is not a trusted or secure host and is being ignored. If this repository is available via HTTPS we recommend you use HTTPS instead, otherwise you may silence this warning and allow it anyway with '--trusted-host pypi.tuna.tsinghua.edu.cn'.
ERROR: Could not find a version that satisfies the requirement jupyter (from versions: none)
ERROR: No matching distribution found for jupyter
WARNING: The repository located at pypi.tuna.tsinghua.edu.cn is not a trusted or secure host and is being ignored. If this repository is available via HTTPS we recommend you use HTTPS instead, otherwise you may silence this warning and allow it anyway with '--trusted-host pypi.tuna.tsinghua.edu.cn'.
在网上无意间看到这个解决方法,速度极快,能达到几个MB/s,看图
用安装jupyter原来安装jupyter的命令是
pip install jupyter
在命令行后面加上-i https://pypi.tuna.tsinghua.edu.cn/simple,换源下载速度极快,命令如下
- #单个下载
- pip install jupyter -i https://pypi.tuna.tsinghua.edu.cn/simple
-
- #多个下载
- >pip install d2l torch torchvision -i https://pypi.tuna.tsinghua.edu.cn/simple
效果如图所示
torch都能有2.2m每秒
上面是初学者的见解,学了一段时间后,发现上面那个就是换源,短暂换源,也可以把网址换成其他镜像源的网址,国内常用镜像源如下:
阿里云: http://mirrors.aliyun.com/pypi/simple/
中国科技大学: https://pypi.mirrors.ustc.edu.cn/simple/
douban: http://pypi.douban.com/simple
Python官方: https://pypi.python.org/simple
v2ex: http://pypi.v2ex.com/simple
中国科学院: http://pypi.mirrors.opencas.cn/simple/
清华大学: https://pypi.tuna.tsinghua.edu.cn/simple/
华中理工大学: https://pypi.hustunique.com/
山东理工大学: https://pypi.sdutlinux.org/
搜狐镜像: http://mirrors.sohu.com/Python/
用了一圈,大部分包其他源有的清华源都有,清华源有的他们不一定有,总结:清华源的最全,先用清华源试再用其他源。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。