当前位置:网站首页>解决jupyter中import torch出错问题
解决jupyter中import torch出错问题
2022-08-11 05:23:00 【壹万1w】
前提:有pytorch虚拟环境
步骤:
以管理员身份运行annaconda prompt
1、进入jupyter运行的文件
2、在此文件下激活pytorch
3、进入jupyter notebook
小tip:使用镜像,加速安装
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple torch
pip
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple
conda install
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --set show_channel_urls yes
删除添加的源,恢复官方源
conda config --remove-key channels
查看源的优先权,
$ conda config --get channels
##下面的是输出
--add channels 'defaults' # lowest priority
--add channels 'https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/'
--add channels 'https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/' # highest priority
jupyter报错ModuleNotFoundError: No module named ‘matplotlib‘
和上述步骤一样
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple torch matplotlib
边栏推荐
猜你喜欢
随机推荐
通过字符设备虚拟文件系统实现kernel和userspace数据交换(基于kernel 5.8测试通过)
内核与用户空间通过字符设备通信
GBase 8s集中式企业级安全事务型数据库
CVPR2022——Not All Points Are Equal : IA-SSD
Use regex to verify whether the file name is legal
关于安全帽识别系统,你需要知道的选择要点
恶劣天气 3D 目标检测数据集收集
GBase 8s与Oracle锁对比
LAGRANGIAN FLUID SIMULATION WITH CONTINUOUS CONVOLUTIONS
GBase 8s存储结构简介及空间管理
对MySQL查询语句的分析
Socket 网络协议 等
TAMNet: A loss-balanced multi-task model for simultaneous detection and segmentation
慢查询语句的优化思路
centos—docker安装mysql
LAGRANGIAN FLUID SIMULATION WITH CONTINUOUS CONVOLUTIONS
LiDAR Snowfall Simulation for Robust 3D Object Detection
梅科尔工作室-DjangoWeb 应用框架+MySQL数据库第三次培训
【uniapp】跨端开发问题记录
【高德地图】易采坑合集








