Anaconda , Pytorch Installation

less than 1 minute read

Installation of Pytorch using Anaconda

To start with Neural Netoworks , we need some packages to make calculations easier.

The Packages I used :

  • Pytorch
  • Open cv
  • Numpy
  • Matplotlib
  • Tqdm
  • NVIDIA CUDA Toolkit
  • NVIDIA cuDNN

I created an environment to hold the above packages in anaconda. Which you can get from here

Recommended to not add it in path , use the anaconda cmd instead

Commands to run in anaconda cmd to install packages :

  1. Create environment

    conda create -n env_name (no quotes “”)

  2. Activate environment

    conda activate env_name

  3. Install Python (I installed 3.7 vr)

    conda install python=3.7

  4. Install Pytorch

    There are many ways to install Pytorch . The one I downloaded is shown below. You get Pip , NVIDIA CUDA Toolkit and numpy with Pytorch

    Pytorch

    conda install pytorch torchvision cudatoolkit=10.2 -c pytorch

    Create your own pytorch installation command here

  5. Install NVIDIA cuDNN

    conda install -c anaconda cudnn

  6. Install Open CV

    pip install open-cv

  7. Install matplotlib

    pip install matplotlib

  8. Install tqdm

    pip install tqdm

Once you’ve installed all the packages . It should look something like this when you run the command “conda list”

Packages

You can crosscheck your versions if you want.

To deactivate environment use - conda deactivate