配置环境

学长一步步教的!非常感谢的!今天总结一下!!!

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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值