I am trying to install Tensorflow using pyenv since the python 3.9.2 installed does not work with Tensorflow. I am running Debian OS 11.Everytime I run " pip install Tensorflow " it shows
Could not find a version that satisfies the requirement Tensorflow (from versions: none)
ERROR: No matching distribution found for Tensorflow.
I am using a 64bit OS with python 3.5.3 installed using Pyenv.
https://imgur.com/dRDWWAP
The process of installing tensor flow has changed over the years a little bit. A few years ago, they didn’t support versions of python greater than 3.6.4, causing users to downgrade their version of python. Now, there is something called tensorflow 2 which supports the higher versions of python. When you try to run the command pip install tensorflow, pip is trying to look for a version of tensorflow which is for the higher versions of python. Here are your two solutions:
You can install a version of tensorflow that corresponds to the version of python you have, so both are compatible. Here is the command: pip install tensorflow==1.5 for CPU edition, and pip install tensorflow-gpu==1.5 for GPU edition. With the older versions, the libraries were different for your CPU and GPU.
Your alternative solution is to install a higher version of python. With py versions 3.7-3.10, they use tensorflow 2 which can be installed with pip install tensorflow. This library for newer versions comes with support for both CPU and GPU in one package.
Related
When I try
pip install torch, I get
ERROR: Could not find a version that satisfies the requirement torch (from versions: none)
ERROR: No matching distribution found for torch
Searching on here stackoverflow I find that the issue is I need an older verson of python, currently I'm using 3.11. That post said 3.8 but was written some time ago, so how do I find the latest version of python that will run pytorch? I couldn't find it easily on the PyTorch pages.
Pytorch supports Python 3.10.
Python 3.11 isn't fully supported yet.
You can always check torch archive or torch nightly to see if your desired version is supported.
While the Python3.11 is not officially supported as of now (Feb 11, 2023), if you are on Linux you can install the Python3.11 version of Pytorch 1.13.1:
wget https://download.pytorch.org/whl/cu117/torch-1.13.1%2Bcu117-cp311-cp311-linux_x86_64.whl
pip3 install torch-1.13.1+cu117-cp311-cp311-linux_x86_64.whl
Just note that this is not yet available on Windows or other major OSes.
If you want to give the new version a try on Other OSes such as Windows or Mac, you need to use the nighly builds.
For example for Windows inside powershell do :
wget https://download.pytorch.org/whl/nightly/cu117/torch-2.0.0.dev20230210%2Bcu117-cp311-cp311-win_amd64.whl -OutFile torch-2.0.0.dev20230210+cu117-cp311-cp311-win_amd64.whl
pip install torch-2.0.0.dev20230210+cu117-cp311-cp311-win_amd64.whl
I want to install TensorFlow, I have tried everything from reinstalling everything to trying different versions it doesn't help.
I have tried it with python 3.9.0 and pip version 20.0.3
Currently (1st of March, 2021), there is no official stable tensorflow version for the latest stable python 3.9.
However, nightly version of tensorflow supports python 3.9.
Simply pip install tf-nightly-gpu or pip install tf-nightly
Note, the library name is the same, e.g. importing works as import tensorflow as tf without any problems. This means you will not have to update your code once official support is added and you've migrated to the stable version.
The Official TensorFlow website specifies python 3.5-3.8.
You need to create a new environment as suggested in the previous answer with a new version of python, or uninstall python 3.9 and install other version. I use python 3.6.8 for Tensorflow and it works great.
I had the similar problem but I am able to resolve it by downloading the python version 3.8.6 and installing it. Please pay attention to add the python and the respective pip path in the environment.
Then give the command, which will install tensorflow version 2.3.1
pip install tensorflow
You may upgrade the pip by following command,
py -m pip install --upgrade pip
I hope that it works for you.
I have a reason that I should use Tensorflow 1.x release, but it returns an error with message:
ERROR: Could not find a version that satisfies the requirement tensorflow==1.15.2 (from versions: 2.2.0.rc1 ~~~~~
ERROR: No matching disribution found for tensorflow==1.15.2
I also tried .whl installation but the latest Tensorflow 1.15.2 support cp37 which I can't use it anymore.
Is tensorflow 1.x is no longer supported on pip or pypi? Or should I downgrade python(3.8 > 3.7) and install Tensorflow using .whl file?
[System Environment]
Ubuntu 20.04 LTS
Python version : 3.8.2
pip version : 20.0.2
Thanks.
According to tensorflow installation guide tensorflow is available on Python 3.5–3.7 you are using a newer version of Python.
The answer above is outdated
Tensorflow supports Python 3.8 now, but Python 3.8 support requires
TensorFlow 2.2 or later
pip 19.0 or later
Ubuntu 16.04 or later
macOS 10.12.6 (Sierra) or later
Windows 7 or later
Raspbian 9.0 or later
Also GPU support requires a CUDA-enabled card (Ubuntu and Windows)
You can check your Python and pip version with these commands:
python --version | python3 --version
Out: Python 3.8.2
pip --version | pip3 --version
Out: pip 20.1.1
You can upgrade your pip with:
pip install --upgrade pip
More info can be found on this link: Install TensorFlow with pip
I would recommend that you avoid installing third-party Python libraries system-wide using pip that will then rely on your system Python. You also really don't want to avoid manually upgrading/downgrading your system Python.
I prefer to use Conda to install TensorFlow. Instructions for installing Conda on Linux are pretty straightforward.
Once you have installed Conda you can install TensorFlow 1.15 with a single command.
conda create --name tensorflow-15 \
tensorflow-gpu=1.15 \
cudatoolkit=10.1 \
cudnn=7.6 \
nccl=2.4 \ # only relevant if you have more than one GPU
python=3.6 \
pip=20.0
One of the many things I like about Conda is that it provides a single tool to manage environments and packages within a particular environment. It also has a much gentler learning curve compared with other tools for isolating software environments like Docker.
If you are interested in learning more about Conda, then you can check out these teaching materials that I am developing.
https://carpentries-incubator.github.io/introduction-to-conda-for-data-scientists/
Seems more and more we have to switch to using containers (Docker, and probably cloud VMs), because everything is incompatible with everything. Yes, you can start a Docker container running Python 3.7 and Tensorflow 1.x, on any version of Linux, but then you want to load files from that container, you have to pass black-magic command line options to mount volumes. Tried using Tensorflow 2 and everything fails. No more tf.Session(), no more tf.global_variables_initializer(), etc. So no working Tensorflow in Ubuntu, you have to use Docker.
Try to isolate your dependencies by using Docker or conda environments, I used:
conda create -n new_env python=3.6 tensorflow-gpu=1.2.1 anaconda
and works fine:)
Tensorflow version for Python 3.7
Any news about tensorflow update for python 3.7. When I try to install tensorflow inside my venv like:
pip install tensorflow
I got an error:
Could not find a version that satisfies the requirement tensorflow (from versions: )
No matching distribution found for tensorflow
Python 3.7 is now supported officially in TensorFlow 1.13.1:
Major Features and Improvements
TensorFlow Lite has moved from contrib to core. This means that
Python modules are under tf.lite and source code is now under
tensorflow/lite rather than tensorflow/contrib/lite.
TensorFlow GPU binaries are now built against CUDA 10 and TensorRT 5.0.
Support for Python3.7 on all operating systems.
Moved NCCL to core.
source
You can see the status of the move to 3.7 here: https://github.com/tensorflow/tensorflow/issues/20517
Firstly, you should download and set up the anaconda via anaconda and then open anaconda prompt and then follow these steps via TensorFlow. Fourthly, you should use 'pip install --ignore-installed --upgrade tensorflow==1.14.0' to install TensorFlow 1.14 on Conda Finally, you can use TensorFlow that is version 1.14 on python 3.7
Have a Great Time.
You need to install a 64-bit version of Python and 3.7 does not work with tensorflow right now, I suggest a downgrade to 3.6.x
I tried many versions of the tensorflow with python 3.7 and failed. But finally tensorflow version 1.14 worked.
I was having the same problem as you- I was using Python 3.7 32-bit on Windows 10 64-bit machine.
Since TensorFlow doesn't support 32-bit Python hence it said that "No matching distribution found for TensorFlow".
What worked for me is that I uninstalled the 32-bit Python version and installed the 64-bit Python version and pip install tensorflow worked immediately for downloading TensorFlow 2.2.0. Note that TensorFlow now supports till Python 3.8.
Check if you have the 32-bit version of Python. To check whether you have the 32-bit version or 64-bit version, type IDLE in the search bar and you will be able to tell which version it is.
Currently, for Windows users,
pip install https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow_cpu-2.1.0-cp37-cp37m-win_amd64.whl
works with python_3.7(64-bit) and at least pip 19.0
I try to install TensorFlow via pip (pip install tensorflow) but get this error
could not find a version that satisfies the requirement tensorflow (from versions: )
Is there a solution to this problem? I still wish to install it via pip
If you only need TensorFlow because of Keras and your are on Python 2.7.x, you can avoid installing Tensorflow(Google) and replace it by CNTK(Microsoft). According to Jeong-Yoon Lee CNTK is a lot (about 2 to 4 times) faster than TensorFlow for LSTM (Bidirectional LSTM on IMDb Data and Text Generation via LSTM), while speeds for other type of neural networks are close to each other.
Your Keras code does not need to be modified (I checked it with 2 examples of Keras using TensorFlow and succesfully replaced TensorFlow with CNTK, without changing anything the Keras code.
So how do you install it?
-CPU-only version of CNTK:
pip install
https://cntk.ai/PythonWheel/CPU-Only/cntk-2.4-cp27-cp27m-win_amd64.whl
-GPU version of CNTK:
pip install
https://cntk.ai/PythonWheel/GPU/cntk-2.4-cp27-cp27m-win_amd64.whl
-Test CNTK install:
python -c "import cntk; print(cntk.version)"
-Install Keras: The Python Deep Learning library
pip install keras
-Enable CNTK as Keras back end iso TensorFlow
modify the "keras.json" file under %USERPROFILE%/.keras
{
"epsilon": 1e-07,
"image_data_format": "channels_last",
"backend": "cntk",
"floatx": "float32"
}
Elaborating a bit on dirty_feri's answer as it's not quite up to date.
Tensorflow for Windows is only supported with Python 3.5 and Python 3.6 (since 1.2). As you are downloading via pip you will be receiving the latest 1.2 version so you should be able to run on 3.6.
There should be no need to use the Anaconda version of Tensorflow, the distribution is not supported and, if you are running anaconda, the pip version does just fine.
If you still require python 2.7 support for other projects then may I suggest the use of an environment manager like anaconda or virtualenv to allow you to have multiple versions of python running nicely at once.
Once you have a supported version of python installed you should be able to run pip install tensorflow and it should install in a few minutes.
Full installation instructions are available here: https://www.tensorflow.org/install/install_windows
There is a great Github repo which has *.whl file to install. support py27 and py36
go to fo40225's Github Repo tensorflow-windows-wheel
find a tensorflow whl version and download
pip install xxx.whl (xxx is your download whl file name)
If you are using windows:
If you take a gander at TensorFlow website under windows PIP installation first line says.
"Pip installation on Windows
TensorFlow supports only 64-bit Python 3.5 on Windows. We have tested the pip packages with the following distributions of Python:"
Now either install python 3.5, or use the unofficial version of Tensorflow from ANACONDA.
other way is to Download and install docker toolbox for windows https://www.docker.com/docker-toolbox Open a cmd window, and type: docker run -it b.gcr.io/tensorflow/tensorflow This should bring up a linux shell. Type python and I think all would be well!
I found that Tensorflow can work on CPU under intergrated Ubuntu to Windows with any version of python.
You may install Ubuntu directly from Windows Store (https://www.microsoft.com/ru-ru/p/ubuntu/9nblggh4msv6)
pip:
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python get-pip.py
sudo pip install tensorflow