【Conda】python environment setup , windows+conda+jupyter+pytorch (English Version)

Install anaconda

  1. Enter the official website of Anaconda:https://www.anaconda.com/
    在这里插入图片描述
  2. Left click download
  3. Double left click the file after downloading,the result should be:
    在这里插入图片描述
  4. Keep clicking next util this part:
    Check add anaconda3 to my PATH environment varible
    在这里插入图片描述
  5. Installation done
    在这里插入图片描述7. Check whether anaconda has been successfully installed:
    Search cmd on the left bottom of screen
    在这里插入图片描述
    open cmd, type conda, conda has been successfully installed if it gives you like this:
    在这里插入图片描述

Create conda environment

  1. Create a new environment named tutorial (setup python version as 3.6)
    conda create -n tutorial python=3.6
    
    Successfully create:在这里插入图片描述

Activate environment

  1. Activate environment tutorial
    conda activate tutorial
    
    Successfully activate:
    在这里插入图片描述

Install jupyter notebook

  1. install
    conda install jupyter
    
  2. open jupyter notebook
    jupyter notebook
    
    在这里插入图片描述

Install pytorch

  1. Enter the official website of pytorch:https://pytorch.org/
  2. Choose the version you need, then copy the installation command.
    在这里插入图片描述4. In cmd, activate the environment you would like to install pytorch into. Then enter the command you copied before.Here I use cpu version pytorch for an example:
    conda install pytorch torchvision torchaudio cpuonly -c pytorch
    
  3. Check wether pytorch has been successfully installed:
    import torch
    torch.__version__
    
    The result should be like this if successfully installed:
    在这里插入图片描述

Replace channel(If need)

Mirror channel is used when you can’t download some package due to the fire wall of China.

  1. Create condarc file:
    conda config --add channels r
    
  2. The condarc file should be in : /home/user/.condarc
  3. Find the file and open it, the content of the file should be like this:
    在这里插入图片描述
  4. Use the content below to replace the content of condarc file:
    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
    
    
    在这里插入图片描述
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

小丫么小阿豪

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值