安装pycharm
安装Anaconda
下载地址:https://www.anaconda.com/distribution/
清华镜像:https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/
WIN + R 搜索 %HOMEPATH% 找到 .condarc 修改为
1 2 3 4 5 6 7 8 9 10 11 12 13 14
| channels: - defaults show_channel_urls: true default_channels: - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2 custom_channels: conda-forge: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud msys2: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud bioconda: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud menpo: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud pytorch: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud simpleitk: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
|
清除索引缓存
conda基本操作
1
| conda create -n pytorch python=3.8.5
|
1
| conda remove -n pytorch --all
|
安装pytorch
1 2
| conda install pytorch torchvision torchaudio cpuonly -c pytorch # 无GPU conda install pytorch torchvision torchaudio cudatoolkit=11.1 -c pytorch -c conda-forge # GPU版本11.1
|
pycharm使用容器
File-Settings-Project-Python Interpreter-Add