ubuntu16.04+pytorch--CPU版安装

ubuntu16.04+pytorch–CPU版安装

1、安装anaconda

anaconda下载地址
python对应anaconda版本
执行如下步骤安装

bash Anaconda3-2020.02-Linux-x86_64.sh
//安装完成执行如下,设置环境变量
gedit ~/.bashrc 
//添加环境变量
export PATH=/home/rikirobot/anaconda3/bin:$PATH

2、安装pytorch

我是官网哈哈哈!

在这里插入图片描述复制 Run this Command:

conda install pytorch torchvision torchaudio cpuonly -c pytorch

运行报错

rikirobot@robot:~$ conda install pytorch torchvision torchaudio cpuonly -c pytorch
Fetching package metadata ...
........
Solving package specifications: 

PackageNotFoundError: Dependencies missing in current linux-64 channels: 
  - torchaudio -> pytorch 1.10.2 -> cudatoolkit >=11.1,<11.2
  - torchaudio -> pytorch 1.10.2 -> libuv >=1.40.0,<2.0a0
  - torchaudio -> pytorch 1.10.2 -> mkl >=2018
  - torchaudio -> pytorch 1.10.2 -> typing_extensions
  - torchaudio -> pytorch 1.10.2 -> dataclasses
  - torchaudio -> python_abi 3.9.* *_cp39
  - torchaudio -> librosa >=0.4.3
  - torchaudio -> sox

Close matches found; did you mean one of these?

    python_abi: python, ipython

(and similarly for the other packages)

找不到对应的包

解决:
1、使用conda,qinghua源去搜索包时出现了 packages missing 的错误,但并不代表这个包或者这个版本的包找不到,我们可以尝试用以下办法: anaconda search -t conda pytorch , 也可在后面加上包的版本号,去搜索:
在这里插入图片描述

2、anaconda show prigoyal/pytorch查看安装方法

在这里插入图片描述

3、执行

 conda install --channel https://conda.anaconda.org/prigoyal pytorch

在这里插入图片描述
参考链接:
https://www.jianshu.com/p/d08798218e1e
https://blog.csdn.net/qq_45779334/article/details/121099052
https://blog.csdn.net/weixin_45885232/article/details/107507921

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值