5

I was tring to install older version of tensorflow gpu on windows 10:

pip install tensorflow-gpu==1.4.0

And I get an error like this other post impling there is no windows version

And I'm wondering if there is a way to get the list of functionning windows tensorflow version

Thanks in advance

Edits

It seems that tensorflow GPU v1.4.0 doesn't work on python 3.7 therefore creating another enviromment and downgrading your python version to 3.6 may resolve the issue.

by using anaconda you can do it this way

conda create -n py36 python=3.6
conda activate py36
pip install tensorflow-gpu==1.4.0

note that another older version of CUDA is required for older version of tensorflow (I had to install CUDA 8.0)

Felox
  • 503
  • 3
  • 10
  • 23
  • Does this answer your question? [Python and pip, list all versions of a package that's available?](https://stackoverflow.com/questions/4888027/python-and-pip-list-all-versions-of-a-package-thats-available) – AMC Jan 08 '20 at 17:06

2 Answers2

20

If you go to the pypi page of tensorflow 1.4, you can see, that only whl files up to python 3.6 are available. I am guessing that you are either using 3.7 or 3.8. That is why

pip install tensorflow-gpu==1.4.0

is not working for you. There simply is no installation candidate for tensorflow-gpu for python versions other than 2.7, 3.3, 3.4, 3.5, 3.6

I think you have two options, since you mentioned that you have conda:

Create an environment

Create an environment that is using python 3.6 and then use pip install like you originally intended

conda create -n py36 python=3.6
conda activate py36
pip install tensorflow-gpu==1.4.0

Try a channel that has your version

You can use the search function on the website to locate a channel that has your specific version available, for 1.4, you should be able to do:

conda install -c cjj3779 tensorflow-gpu

No version specification neccessary, as the only available version in that channel is 1.4

FlyingTeller
  • 17,638
  • 3
  • 38
  • 53
2

Option 1: Installing with pip, but only available versions

Looking at the error message pip created it shows that tensorflow-gpu==1.4.0 is not available.

In order to see available versions, check the versions within parenthesis:

    ERROR: Could not find a version that satisfies the requirement tensorflow-gpu==1.4.0
 (from versions: 1.13.0rc1, 1.13.0rc2, 1.13.1, 1.13.2, 1.14.0rc0, 1.14.0rc1, 1.14.0,
 1.15.0rc0, 1.15.0rc1, 1.15.0rc2, 1.15.0rc3, 1.15.0, 2.0.0a0, 2.0.0b0, 2.0.0b1,
 2.0.0rc0, 2.0.0rc1, 2.0.0rc2, 2.0.0, 2.1.0rc0, 2.1.0rc1, 2.1.0rc2)
 ERROR: No matching distribution found for tensorflow-gpu==1.4.0

Then select the one fits you from available ones:

pip install tensorflow-gpu==1.14.0 

Option 2: Installing with Conda

Go with this tutorial: https://www.datacamp.com/community/tutorials/installing-anaconda-windows

After you install Anaconda to Windows:

1) Create an environment:

conda create -n tf_gpu python=3.6 anaconda

2) Activate this environment:

conda activate tf_gpu

3) Install tf-gpu 1.4:

conda install tensorflow-gpu=1.4
isydmr
  • 649
  • 7
  • 16
  • I already made an installation of tensorflow 1.14 with anaconda. But the script that I want to run was initialy made for 1.4 and it doesn't run on 1.14 – Felox Jan 08 '20 at 16:51
  • Then you need to go for Option-2. Create an environment and install your desired version (1.4) to that environment. – isydmr Jan 08 '20 at 16:53
  • @Felox What’s the issue, then? If you know how to install a specific version of a package with Conda, then just install version 1.4. – AMC Jan 08 '20 at 17:07
  • conda install tensorflow-gpu=1.4.0 gives PackagesNotFoundError: The following packages are not available from current channels: - tensorflow-gpu=1.4.0 – Felox Jan 08 '20 at 17:31
  • try this: conda install tensorflow-gpu=1.4 -c conda-forge – isydmr Jan 08 '20 at 18:05
  • If it does not work add conda forge: ```conda config --append channels conda-forge``` and try to update conda: ```conda update conda```. Then retry! – isydmr Jan 08 '20 at 18:18
  • I run the two instruction before trying the installation, but I still got a `PackagesNotFoundError` – Felox Jan 08 '20 at 18:50
  • Can you see version 1.4.1 in the output of ```conda search tensorflow-gpu -c conda-forge``` ? – isydmr Jan 08 '20 at 19:25
  • @isydmr 1.4.1 is only availabe in conda-forge/linux-64 not the win64 channel – FlyingTeller Jan 09 '20 at 08:16