Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

国内安装PyTorch出现CondaHTTPError #1

Closed
dragen1860 opened this issue Jan 26, 2019 · 2 comments
Closed

国内安装PyTorch出现CondaHTTPError #1

dragen1860 opened this issue Jan 26, 2019 · 2 comments

Comments

@dragen1860
Copy link
Owner

No description provided.

@dragen1860
Copy link
Owner Author

dragen1860 commented Jan 26, 2019

这是因为PyTorch的服务器在国外,国内下载650M文件经常连接不稳定。
解决方法:

方法1. 科学上网(尤其适合国内,以后还会用很多地方需要科学上网,步骤较多,一劳永逸!):shadowsocks
可参考教程:https://github.com/Shadowsocks-Wiki/shadowsocks/blob/master/2-windows-setup-guide-cn.md

方法2. 更改conda为国内源:

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --set show_channel_urls yes

注意是一句一句地执行,并且这个配置过程没有结果输出的(不要以为自己错了)。
接着继续使用pytorch的安装命令进行。
image
注意上图的URL已经指向清华大学了,成功!

  1. 源码安装、pip安装
    步骤较多,不推荐新手。

@lighTQ
Copy link

lighTQ commented Jun 8, 2019

现在好像都不行了,参考这个暂时装好了
https://blog.csdn.net/qq_27882063/article/details/91128270

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants