I have Python3.11.0 on a Windows10 PC.
Trying to install tensorflow using:
pip install tensorflow
gives error. Upon visiting the tensorflow site I realised that it supports only 3.7 - 3.10
Should I downgrade the python version or is any workaround available?
Yes, you should downgrade python to < 3.11 until the wheels are updated to support python 3.11
Yes, you could create a conda environment using python 3.10 to use tensorflow. Here's a link with instructions to follow : https://www.tensorflow.org/install/pip#macos
tensorflow currently supports from python 3.7 - 3.10 4
Related
updated code to work with tensorflow 2.4 to get around issue
I'm trying to install Tensorflow 1.9 on a Raspberry Pi as it is a requirement of the code I want to run. It installs fine on my Macbook using pip install tensorflow==1.9.0, but on the Pi I get the error:
Could not find a version that satisfies the requirement tensorflow==1.9.0 (from versions: 0.11.0, 1.11.0, 1.12.0, 1.13.1, 1.14.0)
No matching distribution found for tensorflow==1.9.0
I'm using a Conda (miniconda3) environment with Python 3.6.
Would using Ubuntu Desktop instead of Raspberry Pi OS work maybe? Or is there perhaps a way to build it from https://github.com/tensorflow/tensorflow/tree/r1.9?
You need to install python version 3.6 or other compatible versions in conda. Tensorflow does not work on versions higher than 3.8 and has identified issues with some other versions. I recommend using python 3.6 through conda. You will also probably need to move the
libcrypto-1_1-x64.dll
libssl-1_1-x64.dll
files from anaconda3\Library\bin to anaconda3/DLLs. You can find more details about this issue if you run into it here.
Hope this answers your question!
To install Tensorflow on Raspberry Pi run:
sudo apt install libatlas-base-dev
and then
pip3 install tensorflow
You can also compilte TensorflowLite and use if you wish. The compile TensorflowLite on RPi refer this link
I'm trying to install Tensorflow on a computer with a J1800 CPU. I know this CPU does not have the AVX extension. I'm trying to find a wheel package of tensorflow without an AVX extension. Every wheel I try gets the same error. Here's one example:
pip3 install https://raw.githubusercontent.com/fo40225/tensorflow-windows-wheel/master/1.14.0/py37/CPU/sse2/tensorflow-1.14.0-cp37-cp37m-win_amd64.whl
: ERROR: tensorflow-1.14.0-cp37-cp37m-win_amd64.whl is not a supported wheel on this platform.
I'm running Python 3.8 64Bit
Does anyone know a wheel that will work on this CPU? Or am I making another mistake?
Only tensorflow >= 2.2 is available on python 3.8.
In order to work with tensorflow 1.14 you need to use another version of python (3.6 or 3.7)
Assuming you are installing tensorflow 1.14 on python 3.8. python 3.8 works with TF 2.0 only. You can either change the python version.
If you have any version like 3.x you can current python version to those by alias
eg :
alias python3 = python3.x
where x > 8
other wise checkout 2.0 and reinstall for the source.
I have installed both tensorflow 2.2.0 and tensorflow 1.15.0(by pip install tensorflow-gpu==1.15.0). The tensorflow 2 is installed in the base environment of Anaconda 3, while the tensorflow 1 is installed in a separate environment.
The tensorflow 2.2.0 can recognize gpu based on a simple test:
if tf.test.gpu_device_name():
print('Default GPU Device: {}'.format(tf.test.gpu_device_name()))
//output: Default GPU Device: /device:GPU:0
But the tensorflow 1.15.0 can not detect gpu.
For your information, my system environment is python + cuda 10.1 + vs 2015.
The tensosflow versions 1.15.0 to 1.15.3 (the latest version) are all compiled against Cuda 10.0. Downgrading the cuda 10.1 to cuda 10.0 solved the problem.
Also be aware of the python version. It is recommended to install the tensorflow .whl file (as listed at https://nero-mirror.stanford.edu/pypi/simple/tensorflow-gpu/) for the specific python version. As for installation, see How do I install a Python package with a .whl file?
Tensorflow 1.15 expects cuda 10.0 , but I managed to make it work with cuda 10.1 by installing the following packages with Anaconda: cudatoolkit (10.0) and cudnn (7.6.5). So, after running
conda install cudatoolkit=10.0
conda install cudnn=7.6.5
tensorflow 1.15 was able to find and use GPU (which is using cuda 10.1).
PS: I understand your environment is Windows based, but this question pops on Google for the same problem happening on Linux (where I tested this solution). Might be useful also on Windows.
It might have to do with the version compatibility of TF, Cuda and CuDNN. This post has it discussed thoroughly.
Have you tried installing Anaconda? it downloads all the requirements and make it easy for you with just a few clicks.
I have tensorflow 1.15 installed on my anaconda environment, and keras 2.3.1. also, windows 10 and python 3.6. based on this, it seems like I need cudnn 5. but the one that conda installed for me is 7.6.5.
when I try to run conda install cudnn==5, or cudnn==5.1, I get:
PackagesNotFoundError: The following packages are not available from current channels:
any ideas how to achieve this?
you must have the miniconda2 == 4.5.4 version
pip install --upgrade https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-0.12.1-cp35-cp35m-win_amd64.whl
In Anaconda3, Im trying to install the wheel but it is not working. On Windows. Using Python 3.6. There isnt a 3.6 wheel. I get this error:
tensorflow-0.12.1-cp35-cp35m-win_amd64.whl is not a supported wheel on this platform.
Use an alternative tensorflow wheel for Python 3.6:
pip install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/windows/gpu/tensorflow_gpu-1.2.0rc2-cp36-cp36m-win_amd64.whl
UPDATE: TensorFlow from version 1.2 forward officially supports Python 3.6
There is no wheel for Python 3.6 for currently not being supported on Windows yet.
As you can see here, Python 3.6 support on Windows is a work in progress.
The only alternative to use TensorFlow on Windows with Python 3.6 is to build it from source.
I also encountered the same problem.
Before they update TensorFlow.
You can try to download the historical version of his 2016-9-27 on this website.
Just change your python version to 3.5 and then retry installing tensorflow. Tensorflow is only compatible with Python 3.5
conda install python=3.5
and then
pip install --upgrade https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-0.12.1-cp35-cp35m-win_amd64.whl