学长一步步教的!非常感谢的!今天总结一下!!!
1.安装anaconda https://www.anaconda.com/products/individual (linux版本)
2.scp 本机文件路径 lll@IP:~/
3.bash ./xxxx.sh (linux是/斜杠,,windows是\斜杠)
4.conda -V 如果没有的话, vim ~/.bashrc
加上export PATH=“/home/lyp/anaconda3/bin:$PATH”
写在最下面
sourse ~/.basnrc conda -V
python
5.pip install torch-xxxx.whl
pip install torchvision-xxx.whl
pip ------>> pip -V
6.新建虚拟环境
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
conda config --set show_channel_urls yes
conda create -n pytorch python=3.6
vim .condarc
按i全部删除,然后:
channels:
- defaults
show_channel_urls: true
channel_alias: https://mirrors.tuna.tsinghua.edu.cn/anaconda
default_channels: - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/pro
- 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 clean -i ,conda create -n pytorch python=3.6
conda activate ame //???
hyper.
pip install torch-1.4.0+cu100-cp36-cp36m-linux_x86_64.whl -i https://pypi.tuna.tsinghua.edu.cn/simple
torchvison再来一遍!
分别安装
8.python
import pytorch
print(torch.cuda.is_available())
然后就是配置 jupyter
https://www.jianshu.com/p/444c3ae23035
pip install jupyterlab-git -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install nbdime -i https://pypi.tuna.tsinghua.edu.cn/simple
9.conda activate ame
conda install ipykernel
python -m ipykernel install --user --name 环境名称 --display-name “kernel名称”
这里区分conda create