Python配置pytorch扩展包优化方案
发布时间
阅读量:
阅读量
切换至国内镜像源,可选用的国内源包括:
- 阿里云 http://mirrors.aliyun.com/pypi/simple/
- 中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/
- 豆瓣(douban) http://pypi.douban.com/simple/
- 清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/
在实际使用过程中,选择中国科技大学提供的镜像源进行操作,其运行速度表现较为理想。
以安装pytorch版本为1.4.0以及torchvision版本为0.5.0为例,具体实现代码如下:
pip install torch==1.4.0 torchvision==0.5.0 -i https://pypi.mirrors.ustc.edu.cn/simple/
pip install torch==1.4.0 torchvision==0.5.0 -i https://pypi.mirrors.ustc.edu.cn/simple/ --trust-host=pypi.mirrors.ustc.edu.cn/simple/
全部评论 (0)
还没有任何评论哟~
