Raphy
(Raphael10 Collab)
November 29, 2021, 12:05pm
1
(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
O.S.: Ubuntu 20.04
Why does it asks for python3.1 if the latest stable python version is 3.10 ? How to solve the problem?
1 Like
zilong
November 30, 2021, 12:17am
2
I think it says that you are currently using python 3.1.
Raphy
(Raphael10 Collab)
November 30, 2021, 6:09pm
3
Hi!
It works with python 3.8 and the problem seems related with conda:
opened 12:01PM - 29 Nov 21 UTC
releng
triaged
(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
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,>=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