Linux下安装Anaconda
安装之时碰到了HTTPERROR的错误,尝试了切换镜像源,https改成http,删去default,切换到离线模式都没解决。
直到后来查看错误,发现可能是域名解析问题,之前ping一个域名时是无法连接的,这次莫名其面可以解析域名,然后就安装成功了。
1 | Anaconda常见命令 |
Anaconda安装pytorch
Ubuntu
(40条消息) 一文讲清楚CUDA、CUDA toolkit、CUDNN、NVCC关系_健0000的博客-CSDN博客_cudatoolkit和cuda有关系吗
win10
win10下安装Anaconda的教程(python环境+jupyter_notebook)
这个好使win10下在VScode终端中无法用conda activate激活虚拟环境
在安装Anaconda前若win10已安装了python,安装Anaconda后会使用其自带的python
若删除Anaconda的环境变量,则可恢复使用原python
win10+pytorch1.4+cuda10.1安装:从显卡驱动开始
1 | import torch # 没报错说明pytorch安装成功 |
卸载Pytorch
1、使用conda卸载Pytorch
conda uninstall pytorch
conda uninstall libtorch
2、使用pip卸载Pytorch
pip uninstall torch
如何查看当前pytorch版本
有时候我们想要知道当前的pytorch版本,我们可以使用如下代码打印出当前的版本:
进入Python
import torch
print(torch.__version__)
WSL2
PyTorch使用出现的问题
PyTorch:The “freeze_support()” line can be omitted if the program is not going to be frozen
https://blog.csdn.net/shenfuli/article/details/103969964
UnicodeDecodeError: ‘gbk’ codec can’t decode byte 0xad in position 607: illegal multibyte sequence
https://blog.csdn.net/zhangpeterx/article/details/88663052
out of memory
https://blog.csdn.net/qq_28660035/article/details/80688427
RuntimeError: Attempting to deserialize object on a CUDA device but torch.cuda.is_available() is False. If you are running on a CPU-only machine, please use torch.load with map_location=’cpu’ to map your storages to the CPU.
https://blog.csdn.net/quantum7/article/details/89333293
jupyter notebook中出现”No module named torch”的解决方法