当前位置:网站首页>pytorch安装错误
pytorch安装错误
2022-08-03 09:19:00 【南吕十七】
纠正
安装pytorch
首先要创建虚拟环境:conda activate pytorch
从(base)->(pytorch)
结果出现错误
Solving environment: failed
CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/noarch/repodata.json>
Elapsed: -
An HTTP error occurred when trying to retrieve this URL.
HTTP errors are often intermittent, and a simple retry will get you on your way.
SSLError(MaxRetryError('HTTPSConnectionPool(host=\'mirrors.tuna.tsinghua.edu.cn\', port=443): Max retries exceeded with url: /anaconda/cloud/conda-forge/noarch/repodata.json (Caused by SSLError(SSLError("bad handshake: Error([(\'SSL routines\', \'ssl3_get_server_certificate\', \'certificate verify failed\')])")))'))
因为正常安装pytorch是后面要加-c pytorch 的,但是我这里本来是想用清华源的
这里输入
conda config --set show_channel_urls yes让conda告诉我们下载的时候用的哪个镜像源
之后输入conda install pytorch torchvision torchaudio cudatoolkit=11.3 -c pytorch开始安装,结果出现以错误
原因可能是:清华源有误,找到C:\Users\Administrator文件下的.condarc文件将里面的内容改为:
channels:
- defaults
show_channel_urls: true
default_channels:
- http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
- http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r
- http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2
custom_channels:
conda-forge: http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
msys2: http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
bioconda: http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
menpo: http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
pytorch: http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
simpleitk: http://mirr
输入:conda config --add channels conda-forge
之后再在Anaconda prompt中输入conda install pytorch torchvision torchaudio cudatoolkit=11.3 -c pytorch 就安装成功了,
判断是否安装成功
输入pip list 出现
或者输入python,之后输入import torch 不报错即表示安装成功
边栏推荐
- MySQL-TCL语言-transaction control language事务控制语言
- unity的game界面里有canvas的线框?如何隐藏掉?
- 基于二次型性能指标的燃料电池过氧比RBF-PID控制
- QT中线程调用GUI主线程控件的问题
- Redis和MySQL如何保持数据一致性
- What exactly does a firmware engineer do?
- Rabbit and Falcon are all covered, Go lang1.18 introductory and refined tutorial, from Bai Ding to Hongru, the whole platform (Sublime 4) Go lang development environment to build EP00
- 10 Convolutional Neural Networks for Deep Learning 2
- MYSQL 修改时区的几种方法
- 索引(三)
猜你喜欢
随机推荐
判断根节点是否等于子节点之和
【快手面试】Word2vect生成的向量,为什么可以计算相似度,相似度有什么意义?
What are pseudo-classes and pseudo-elements?The difference between pseudo-classes and pseudo-elements
Path Prefixes (倍增!树上の二分)
Laya中关于摄像机跟随人物移动或者点击人物碰撞器触发事件的Demo
dflow部署简记
Network LSTM both short-term and long-term memory
For heavy two-dimensional arrays in PHP
MySQL-存储过程-函数-
MYSQL 修改时区的几种方法
Unity编辑器扩展批量修改图片名称
英文语法-状语从句
dflow入门4——recurse&reuse&conditional
SQL每日一练(牛客新题库)——第5天:高级查询
基于百度AI和QT的景物识别系统
【LeetCode】622.设计循环队列
多媒体数据处理实验1:算术编码
Redis实现分布式锁
系统io统计
深度学习之 10 卷积神经网络2