PyTorch installation asks for python=3.1 . Python Version installed: 3.10.0

Raphy: <pre><code>(pgqa) raphy@pc:~/pythonMatters/PathGenerator$ conda install pytorch torchvision torchaudio cpuonly -c pytorch
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:

  - python=3.1

Current channels:

  - https://conda.anaconda.org/pytorch/linux-64
  - https://conda.anaconda.org/pytorch/noarch
  - https://repo.anaconda.com/pkgs/main/linux-64
  - https://repo.anaconda.com/pkgs/main/noarch
  - https://repo.anaconda.com/pkgs/r/linux-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.


(pgqa) raphy@pc:~/pythonMatters/PathGenerator$ python3 --version
Python 3.10.0
</code></pre>
<p>O.S.: Ubuntu 20.04</p>
<p>Why does it asks for python3.1 if the latest stable python version is 3.10 ? How to solve the problem?</p>

zilong: <p>I think it says that you are currently using python 3.1.</p>

Raphy: <p>Hi!</p>
<p>It works with python 3.8 and the problem seems related with conda:</p>
<aside class="onebox githubissue" data-onebox-src="https://github.com/pytorch/pytorch/issues/68982#issuecomment-982294662">
  <header class="source">

      <a href="https://github.com/pytorch/pytorch/issues/68982#issuecomment-982294662" target="_blank" rel="noopener nofollow ugc">github.com/pytorch/pytorch</a>
  </header>

  <article class="onebox-body">
    <div class="github-row">
  <div class="github-icon-container" title="Issue">
	  <svg width="60" height="60" class="github-icon" viewbox="0 0 14 16" aria-hidden="true"><path d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"></path></svg>
  </div>

  <div class="github-info-container">
    <h4>
      <a href="https://github.com/pytorch/pytorch/issues/68982#issuecomment-982294662" target="_blank" rel="noopener nofollow ugc">PyTorch installation doesn't work with Python 3.10.0 </a>
    </h4>

    <div class="github-info">
      <div class="date">
        opened <span class="discourse-local-date" data-format="ll" data-date="2021-11-29" data-time="12:01:21" data-timezone="UTC">12:01PM - 29 Nov 21 UTC</span>
      </div>


      <div class="user">
        <a href="https://github.com/raphael10-collab" target="_blank" rel="noopener nofollow ugc">
          <img alt="raphael10-collab" src="https://avatars.githubusercontent.com/u/70313067?v=4" class="onebox-avatar-inline" width="20" height="20">
          raphael10-collab
        </a>
      </div>
    </div>

    <div class="labels">
        <span style="display:inline-block;margin-top:2px;background-color: #B8B8B8;padding: 2px;border-radius: 4px;color: #fff;margin-left: 3px;">
          releng
        </span>
        <span style="display:inline-block;margin-top:2px;background-color: #B8B8B8;padding: 2px;border-radius: 4px;color: #fff;margin-left: 3px;">
          triaged
        </span>
    </div>
  </div>
</div>

  <div class="github-row">
    <p class="github-body-container">(pgqa) raphy@pc:~/pythonMatters/PathGenerator$ conda install pytorch torchvision<span class="show-more-container"><a href="" rel="noopener" class="show-more">…</a></span><span class="excerpt hidden"> torchaudio cpuonly -c pytorch
    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:
    
      - python=3.1
    
    Current channels:
    
      - https://conda.anaconda.org/pytorch/linux-64
      - https://conda.anaconda.org/pytorch/noarch
      - https://repo.anaconda.com/pkgs/main/linux-64
      - https://repo.anaconda.com/pkgs/main/noarch
      - https://repo.anaconda.com/pkgs/r/linux-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.
    
    
    (pgqa) raphy@pc:~/pythonMatters/PathGenerator$ python3 --version
    Python 3.10.0

Tried installing PyTorch with pip but got these errors:

    (pgqa) raphy@pc:~/pythonMatters/PathGenerator$ pip3 install torch==1.10.0+cpu torchvision==0.11.1+cpu torchaudio==0.10.0+cpu -f https://download.pytorch.org/whl/cpu/torch_stable.html
    Looking in links: https://download.pytorch.org/whl/cpu/torch_stable.html
    ERROR: Could not find a version that satisfies the requirement torch==1.10.0+cpu (from versions: none)
    ERROR: No matching distribution found for torch==1.10.0+cpu

pip version: 

    (pgqa) raphy@pc:~$ pip --version
    pip 21.2.4 from /home/raphy/anaconda3/envs/pgqa/lib/python3.10/site-packages/pip (python 3.10)
    (pgqa) raphy@pc:~$ pip3 --version
    pip 21.2.4 from /home/raphy/anaconda3/envs/pgqa/lib/python3.10/site-packages/pip (python 3.10)

Python Version:

    (pgqa) raphy@pc:~$ python --version
    Python 3.10.0




    (pgqa) raphy@pc:~$ virtualenv --python=/usr/bin/python3.8 /home/raphy/anaconda3/envs/pgqa
    created virtual environment CPython3.8.10.final.0-64 in 280ms
      creator CPython3Posix(dest=/home/raphy/anaconda3/envs/pgqa, clear=False, no_vcs_ignore=False, global=False)
      seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/raphy/.local/share/virtualenv)
        added seed packages: pip==21.1.1, setuptools==56.0.0, wheel==0.36.2
      activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator
    (pgqa) raphy@pc:~$ python --version
    Python 3.8.10
    (pgqa) raphy@pc:~$ pip --version
    pip 21.1.1 from /home/raphy/anaconda3/envs/pgqa/lib/python3.8/site-packages/pip (python 3.8)
    (pgqa) raphy@pc:~$ pip3 install torch==1.10.0+cpu torchvision==0.11.1+cpu torchaudio==0.10.0+cpu -f https://download.pytorch.org/whl/cpu/torch_stable.html
    Looking in links: https://download.pytorch.org/whl/cpu/torch_stable.html
    Collecting torch==1.10.0+cpu
      Downloading https://download.pytorch.org/whl/cpu/torch-1.10.0%2Bcpu-cp38-cp38-linux_x86_64.whl (199.3 MB)
         |████████████████████████████████| 199.3 MB 35 kB/s 
    Collecting torchvision==0.11.1+cpu
      Downloading https://download.pytorch.org/whl/cpu/torchvision-0.11.1%2Bcpu-cp38-cp38-linux_x86_64.whl (16.2 MB)
         |████████████████████████████████| 16.2 MB 50.1 MB/s 
    Collecting torchaudio==0.10.0+cpu
      Downloading https://download.pytorch.org/whl/cpu/torchaudio-0.10.0%2Bcpu-cp38-cp38-linux_x86_64.whl (2.7 MB)
         |████████████████████████████████| 2.7 MB 53.5 MB/s 
    Collecting typing-extensions
      Downloading typing_extensions-4.0.0-py3-none-any.whl (22 kB)
    Collecting pillow!=8.3.0,&gt;=5.3.0
      Downloading Pillow-8.4.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.1 MB)
         |████████████████████████████████| 3.1 MB 21.3 MB/s 
    Collecting numpy
      Using cached numpy-1.21.4-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (15.7 MB)
    Installing collected packages: typing-extensions, torch, pillow, numpy, torchvision, torchaudio
    Successfully installed numpy-1.21.4 pillow-8.4.0 torch-1.10.0+cpu torchaudio-0.10.0+cpu torchvision-0.11.1+cpu typing-extensions-4.0.0
    WARNING: You are using pip version 21.1.1; however, version 21.3.1 is available.
    You should consider upgrading via the '/home/raphy/anaconda3/envs/pgqa/bin/python -m pip install --upgrade pip' command.
(pgqa) raphy@pc:~$ 



O.S.: Ubuntu 20.04</span></p>
  </div>

  </article>

  <div class="onebox-metadata">
    
    
  </div>

  <div style="clear: both"></div>
</aside>