QBoard » Artificial Intelligence & ML » AI and ML - PyTorch » Install specific PyTorch version (pytorch==1.0.1)

Install specific PyTorch version (pytorch==1.0.1)

  • I'm trying to install specific PyTorch version under conda env:

    Using pip:

    pip3 install pytorch==1.0.1
    WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
    Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
    To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
    Defaulting to user installation because normal site-packages is not writeable
    ERROR: Could not find a version that satisfies the requirement pytorch==1.0.1 (from versions: 0.1.2, 1.0.2)
    ERROR: No matching distribution found for pytorch==1.0.1

     

    Using Conda:

    conda install pytorch==1.0.1
        Collecting package metadata (current_repodata.json): done
        Solving environment: failed with initial frozen solve. Retrying with flexible solve.
        Collecting package metadata (repodata.json): done
        Solving environment: failed with initial frozen solve. Retrying with flexible solve.
        
        PackagesNotFoundError: The following packages are not available from current channels:
        
          - pytorch==1.0.1
        
        Current channels:
        
          - https://repo.anaconda.com/pkgs/main/osx-64
          - https://repo.anaconda.com/pkgs/main/noarch
          - https://repo.anaconda.com/pkgs/r/osx-64
          - https://repo.anaconda.com/pkgs/r/noarch
        
        To search for alternate channels that may provide the conda package you're
        looking for, navigate to
        
            https://anaconda.org
        
        and use the search bar at the top of the page.

     

    I was able to find this version under https://anaconda.org/soumith/pytorch but is there a way to find it and install from console?

     
      December 8, 2021 10:29 AM IST
    0
  • This works for me:

    conda install pytorch==1.7.1 torchvision cudatoolkit=10.2 -c pytorch
    

     

    note I also specified the cuda version too.

    Note this was asked on the pytorch forum too: https://discuss.pytorch.org/t/how-to-switch-to-older-version-of-pytorch/19656/21

      December 23, 2021 2:10 PM IST
    0
  • You can download/install the version you like from the official Pytorch's Conda package. the link you specified is an old version and is not supported/updated for quit some time now!.
    Install your desired version like this :
    conda install pytorch==1.0.1 torchvision==0.2.2 -c pytorch
    If you are looking for a pip version, you can view and access all versions from here as well.
    and simply do :
    You can always check the previous versions here as well.
      December 10, 2021 4:24 PM IST
    0
  • You could download a previous version of pytorch by using any of these : For Linux/Windows Specific OS

    # CUDA 9.0
    conda install pytorch==1.0.1 torchvision==0.2.2 cudatoolkit=9.0 -c pytorch
    
    # CUDA 10.0
    conda install pytorch==1.0.1 torchvision==0.2.2 cudatoolkit=10.0 -c pytorch
    
    # CPU Only
    conda install pytorch-cpu==1.0.1 torchvision-cpu==0.2.2 cpuonly -c pytorch 

     

    Visit this website to see how to install pytorch versions on your specific operating software. I hope this answer was helpful.

     
      December 11, 2021 2:57 PM IST
    0
  • pytorch install
    pip install torch==1.8.1+cu102 torchvision==0.9.1+cu102 torchaudio===0.8.1 -f https://download.pytorch.org/whl/torch_stable.html

     

    how to install pytorch 0.4.1

    pip install --trusted-host pypi.org --trusted-host files.pythonhosted.org torch===0.4.1 torchvision===0.4.2 -f https://download.pytorch.org/whl/torch_stable.html​
      December 17, 2021 12:07 PM IST
    0