当前位置:网站首页>解决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
边栏推荐
猜你喜欢

Robust 3D Object Detection in Cold Weather Conditions

centos—docker安装mysql

MGRE环境下的OSPF综合实验

梅科尔工作室-Pr第一次培训笔记(安装及项目创建)

mAPH——Waymo数据集

TAMNet: A loss-balanced multi-task model for simultaneous detection and segmentation

Robust 3D Object Detection in Cold Weather Conditions

梅科尔工作室-DjangoWeb 应用框架+MySQL数据库第五次培训

CNN-based Point Cloud De-Noising

docker搭建redis主从和哨兵模式集群
随机推荐
动画(其二)
MGRE实验
SCNet:Semantic Consistency Networks for 3D Object Detection
内核与用户空间通过字符设备通信
GBase 8a技术特性-集群架构
mAPH——Waymo数据集
>>开发工具:开发工具排名对比
>>数据管理:读书笔记|第一章 数据管理
Waymo数据集使用介绍(waymo-open-dataset)
静态综合复习实验
Mei cole studios - sixth DjangoWeb application framework + MySQL database training
【OAuth2】授权机制
梅科尔工作室-HarmonyOS应用开发第一次培训
OpenPCDet installs the latest version: spconv in one step
架构设计杂谈
Robust 3D Object Detection in Cold Weather Conditions
Generic kernel and userspace Makefiles
CVPR2022——A VERSATILE MULTI-VIEW FRAMEWORK
GBase 8s共享内存中的常驻内存段
LAGRANGIAN FLUID SIMULATION WITH CONTINUOUS CONVOLUTIONS