美文网首页
ubuntu 16.04安装pytorch

ubuntu 16.04安装pytorch

作者: ccccxxxxcccc | 来源:发表于2019-03-12 11:09 被阅读0次

基于conda安装,pyhon3.6 cpu版

修改conda镜像源为清华大学的源

conda config --prepend channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/

查看是否修改成功,首先运行如下命令

conda config --set show_channel_urls yes

会生成一个condarc的文件可以查看

cat ~/.condarc

内容为

channels:

  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/

  - defaults

show_channel_urls: true

去pytorch官网查看安装命令,python 3.6 cpu版命令如下

conda install pytorch-cpu torchvision-cpu -c pytorch

安装完成之后输入python,然后import torch进行测试

相关文章

网友评论

      本文标题:ubuntu 16.04安装pytorch

      本文链接:https://www.haomeiwen.com/subject/qfjgpqtx.html