How to solve "ERROR: No matching distribution found for tensorflow==1.12.0" - tensorflow

I am trying to install tensorflow 1.12.0. This is the command that I am using pip install tensorflow==1.12.0. I got this command from this link. This is the error that I am getting.
ERROR: Could not find a version that satisfies the requirement
tensorflow==1.12.0 (from versions: 2.5.0rc0, 2.5.0rc1, 2.5.0rc2,
2.5.0rc3, 2.5.0) ERROR: No matching distribution found for tensorflow==1.12.0
What am I doing wrong?

You can install previous versions of Tensorflow directly from the Github release page. For example, the 1.12.0 version can be downloaded from https://github.com/tensorflow/tensorflow/releases/tag/v1.12.0.

My python version was 3.9. Intalling python version 3.6 solved the problem. I installed it in virtual environment with conda.

Related

Cannot install Tensorflow 2.4.1 as a dependency for OpenVino

When going through the process of installing OpenVino as documented here, I'm running:
sudo ./install_prerequisites.sh
and getting
ERROR: Could not find a version that satisfies the requirement tensorflow~=2.4.1 (from versions: 2.5.0rc0, 2.5.0rc1, 2.5.0rc2, 2.5.0rc3, 2.5.0, 2.5.1, 2.5.2, 2.6.0rc0, 2.6.0rc1, 2.6.0rc2, 2.6.0, 2.6.1, 2.6.2, 2.7.0rc0, 2.7.0rc1, 2.7.0, 2.8.0rc0)
ERROR: No matching distribution found for tensorflow~=2.4.1
As suggested in the documentation, you can configure frameworks individually if there are errors. However, even using pip it doesn't seem there is a matching distribution for Tensorflow 2.4.1:
pip install tensorflow==2.4.1
ERROR: No matching distribution found for tensorflow==2.4.1
How can you get Tensorflow 2.4.1 installed?
I've already shown you how to debug such problems. Well, let's see.
The list of available packages for tensorflow 2.4.1 includes wheels for Python 3.6-3.8. No 3.9 and no source code. Wheels for Python 3.9 are available starting from tensorflow 2.5.0rc0 — exactly like is said in the error message.
What can you do? 1) Downgrade once more, to Python 3.8. Or 2) Use more recent OpenVino source code; the current sources at GitHub list tensorflow~=2.5 as a dependency. Or 3) Find in your downloaded sources files requirements*.txt and replace version tensorflow~=2.4.1 with 2.5.0.

OSError: libcudart.so.10.2: cannot open shared object file: No such file or directory

For some reason, I am getting this error on Colab, even if I don't use GPU... Any help would be greatly appreciated! Thanks! The error message is as following:
OSError: libcudart.so.10.2: cannot open shared object file: No such file or directory
The reason is a mismatch of CUDA versions. I ran into this issue because the preinstalled version of pytorch did match the default version which I installed using %pip install torchaudio (CUDA 10.2). print(torch.__version__) gives 1.10.0+cu111 (CUDA 11.1).
So I reinstalled pytorch, torchaudio and torch vision with the command stated on the pytorch website
%pip install torch==1.10.0+cu113 torchvision==0.11.1+cu113 torchaudio==0.10.0+cu113 -f https://download.pytorch.org/whl/cu113/torch_stable.html
After restarting the environment, it should work.
This method uninstalls pytorch and reinstalls another version, it would be faster to just install the matching version of pytorch, in my case:
%pip install -q torchaudio==0.10.0+cu111 -f https://download.pytorch.org/whl/cu111/torch_stable.html
I don't know if it would be better to install the cu113 variant.
Also, I would suggest to check the error logs to find out the python package that causes the error. In my case, it was generated in torch-cluster and it simply resolved by downgrading torch-cluster to 1.5.9 (recent version is 1.6.0 which is release just couple of weeks back and was installed by default)
I've solved it by replacing the version of torchaudio installed by pip with the one from conda.
pip uninstall torchaudio
conda install torchaudio -c pytorch
Notice the message of conda, it installs the version with bundled CUDA lib:
The following NEW packages will be INSTALLED:
torchaudio pytorch/linux-64::torchaudio-0.11.0-py38_cu113

Could not find a version that satisfies the requirement tensorflow==1.15 (from versions: none). No matching distribution found

I created a virtual environment in Pycharm for Python 3.7
But when I try to install a lower version of Tensorflow in that venv, using
pip install tensorflow==1.15
I get this error.
ERROR: Could not find a version that satisfies the requirement tensorflow==1.15 (from versions: none)
ERROR: No matching distribution found for tensorflow==1.15
My pip is upgraded.
MY OS is Arch Linux.
Any suggestions?

How to downgrade tensorflow 2.0.1 to 0.9.0? in Mac OS

$ pip install tensorflow==0.9.0
ERROR: Could not find a version that satisfies the requirement tensorflow==0.9.0 (from versions: 2.0.1)
ERROR: No matching distribution found for tensorflow==0.9.0
I don't know the reason...
I would suggest you to create a virtual environment and then fresh install TF using pip install "tensorflow==0.9.0"

How to install TensorFlow-gpu with cuda8.0?

I tried to install it according to the instructions on official website, which results in an ImportError when I import tensorflow:
ImportError: libcublas.so.9.0: cannot open shared object file: No such file or directory
I run the code cat /usr/local/cuda/version.txt, which shows that my cuda version is 8.0.61.
It seems that tensorflow is looking for cuda 9.0. I cannot upgrade the cuda as I am working on a shared gpu-server and I do not have the root authority.
Is there any way to make tensorflow work with cuda 8.0? Or any other way available?
Thanks!!
You'll need to install the version 1.4.1 for CUDA-8 as
pip install tensorflow-gpu==1.4.1
The latest (version 1.5) is for CUDA-9
I was facing the similar issue, until I found
https://www.tensorflow.org/install/install_sources#tested_source_configurations
check your installed cuda version and cudnn version and then find out which version of tensorflow-gpu is compatible with those using link mentioned above.
I had installed cuda 8 and cudnn v5.1, hence by checking above link tensorflow-gpu 1.2.0 was compatible and after installing that using
pip install tensorflow-gpu==1.2.0
It worked for me.