cannot install pip install torchvision - python

I am using python 3.8.3 version, I tried to install torchvision and torch module and faced this error, none of them are installed. The error comes as ERROR:could not find a version that satisfies the requirement torch==1.4.0(from versions:0.1.2,0.1.2,post1,0.1.2.post2)
Error:No matching distribution found for torch==1.4.0

According to PyTorch's website, you must specify if you are using cpu or the version of CUDA when installing from pip.
For instance, if I wanted to install on a Linux system without CUDA, version 1.5.1 of PyTorch, I would run:
pip install torch==1.5.1+cpu torchvision==0.6.1+cpu -f https://download.pytorch.org/whl/torch_stable.html
You can use the link I provided above to get the syntax for your specific environment.

Related

ERROR: Could not find a version that satisfies the requirement torch (from versions: none) ERROR: No matching distribution found for torch

I tried to download torch by using pip install torch
I faced this problem:
C:\Users\Ahmad Sadek>pip install torch
ERROR: Could not find a version that satisfies the requirement torch (from versions: none)
ERROR: No matching distribution found for torch
It isn't officially supported by 3.10 yet. Use the nightly builds:
pip3 install --pre torch -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html
This occurs if you are on a version of python greater than 3.7 on Windows. PyTorch specifies on their website that versions later than 3.7 are not supported. I had this error show up for me on my Windows machine when using 3.8. After installing 3.7 and setting that as the default python the issue resolved.
As per previous answers, python versions greater than 3.7 are not currently supported on the stable release.
Options are:
Keep Python > 3.7: Use the Nightly version - modify the installation configuration from PyTorch website as per your needs (Win/Lin/Mac, CUDA version). For example: Nightly, Windows, pip, cuda 11.8 is:
pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu118
revert to an earlier version of Python, e.g. 3.7 and install Stable release of PyTorch. E.g.:
pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu117
Use Anaconda which seems to resolve issues, eventually (see image)
screenshot_anaconda_install_pytorch

How to install PyTorch for Real-Time-Voice-Cloning on Windows?

I've got the following problem: I want to install CorentinJ/Real-Time-Voice-Cloning but there's a problem with PyTorch. Here's what I've done already:
downloaded the Real-Time-Voice-Cloning repository
downloaded the pre-trained models into the encoder, vocoder and synthesizer folder
installed ffmpeg
successfully ran pip install -r requirements.txt
installed Anaconda
successfully installed PyTorch using conda install pytorch torchvision torchaudio cpuonly -c pytorch
However, when checking the installation using python demo_cli.py I get the error:
ModuleNotFoundError: No module named 'torch'
Then, I tried installing PyTorch with Pip using the following command I got on https://pytorch.org/get-started/locally:
pip3 install torch==1.8.1+cpu torchvision==0.9.1+cpu torchaudio===0.8.1 -f https://download.pytorch.org/whl/torch_stable.html
But I got the error:
ERROR: Could not find a version that satisfies the requirement torch==1.8.1+cpu (from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2)
ERROR: No matching distribution found for torch==1.8.1+cpu
Also, I tried just pip3 install torch (and pip install torch) but got the error: ModuleNotFoundError: No module named 'tools.nnwrap'. I was able to install tools but didn't succeed in installing nnwrap.
What can I do to make Real-Time-Voice-Cloning work? Do I have to use CUDA for PyTorch to work?
My Python version: 3.7.4
You may install cpu only pytorch and vocoder,synthesizer , encoder files available on github repo of CoretinJ real time voice cloning. Then do : python demo_toolbox.py and you get the GUI or python demo_cli.py to use CLI.
Solution: I didn't know I have to use Anaconda Prompt for running python demo_cli.py. Then it works.

Problems installing tensorflow on Windows 10

i have been trying to install TensorFlow on my Win10 machine using pip, I have never had a problem using pip before but for some reason when I run pip install tensorflow with pip version 21.0.1 I get the following error
ERROR: Could not find a version that satisfies the requirement tensorflow
ERROR: No matching distribution found for tensorflow
I have tried to install using the --user tag but same problem occurs, i got the install command from the official website https://www.tensorflow.org/install,
if anyone knows what is causing pip to think the package doesn't exist any help appreciated.
Tensorflow supports only Python 3.5-3.8 versions. That might cause a problem.
You can read more at a similar post about that error; Could not find a version that satisfies the requirement tensorflow
I suggest you to use virtual environments created with Conda.
https://docs.anaconda.com/anaconda/install/windows/
If you use Conda, you can specify required Python version, pip libraries to that env and use it from anywhere in your OS.

How to install older version of Tensorflow?

I follow this tutorial. He uses Tensorflow 1.10.0. I should use that version too. Because tutorial is not compatible with newer versions of Tensorflow.
So,when I open Anaconda Prompt and write
pip3 install --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.10.0-py3-none-any.whl
to base and I see this long error message. How can install Tensorflow 1.10.0?
I also tried:
conda create --name="tfold" python=3.7
conda activate tfold
pip install tensorflow==1.10.0
and I see this error message:
ERROR: Could not find a version that satisfies the requirement tensorflow==1.10.0 (from versions: none)
ERROR: No matching distribution found for tensorflow==1.10.0
EDIT: The oldest version compatible with Python 3.7 is 1.13. I installed Python 3.6. Then, I installed it using conda create -n test_env tensorflow=1.10.0
I think the problem is because you are using python3.7
Try using pip and not pip3
Set python=2.7 and use pip install tensorflow==1.10, it worked fine for me.

PIP Won't install Tensorflow

I'm trying to install tensorflow with pip, but every time I try I get this:
pip3 install Tensorflow
Collecting Tensorflow
ERROR: Could not find a version that satisfies the requirement Tensorflow
(from versions: none)
ERROR: No matching distribution found for Tensorflow
What do I do?
(I'm running Pip 19.2.2 on Windows 7 x64 if this info is needed)
Try python3 -m pip install tensorflow
Also tensorflow only supports 64 bit version Python, check that you have installed the correct version.
Also, often times its easier to use a slightly older Python version together with Tensorflow. I have found installations of e.g. Python 3.6.x + tf to work more smoothly than 3.7.x.
Run
pip install --upgrade tensorflow

Categories