I'm hesitating whether to downgrade to Python 3.6 or install a new version of TensorFlow.
Does TensorFlow 1.9 support Python 3.7?
I'm hesitating whether to downgrade to Python 3.6 or install a new version of TensorFlow.
Does TensorFlow 1.9 support Python 3.7?
I was able to install Tensorflow 1.12.0 with Python 3.7 on MacOS, with the following command.
sudo python3 -m pip install --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.12.0-py3-none-any.whl
Not yet. It seems there are some variables named "async", which has become a keyword in 3.7. Shouldn't be too difficult to fix, but still a problem.
Source: https://github.com/tensorflow/tensorflow/issues/20444
Probably not yet.
First of all, you will probably get a SyntaxError: invalid syntax
because some parameters and variables at the pywrap_tensorflow_internal.py
module have the name async
which is a reserved keyword in Python 3.7.0 (see also this post).
However, you can solve this by simply changing the name of all these (Ctrl + R
and Replace All
) from async
to for example async1
.
The problem is that then you will probably get a ImportError: No module named '_pywrap_tensorflow_internal'
which perhaps may be fixed for any previous version before Python 3.7.0 as this post on StackOverflow suggests but personally I could not fix it on my laptop with Python 3.7.0 .
Consequently, I simply downgraded to Python 3.6.6 and now Tensorflow is working fine.
as of Aug 26tH, there is an update on the tensorflow github site https://github.com/tensorflow/tensorflow/pull/21202
Finally Worked for me!
On Python 3.6.4 (even 3.6.5 failed for me) Install Python3.6.4 from here: https://www.python.org/downloads/mac-osx/
If you're facing issues with Python pkgs that you already had on you older version just revert it using this post: python location on mac osx
According to the comments on github see https://github.com/tensorflow/tensorflow/issues/20517#issuecomment-457185528
by member av8ramit "We are aiming to try and have Windows and Ubuntu python binaries by rc2 or the official." the estimated release date for 2019-02-03
however on https://github.com/winpython/winpython/issues/687 one can read from a winpython contributor: "Tensorflow-2 is 2019, Tensorflow-1 on Python-3.7 is still not in sight"
I found this to work after searching for a while.
As Tensorflow only supports Python 3.6 as of now, you can install a different version of python alongside your standard one. Here are the steps I followed:
tar -xvzf Python-3.6.6.tgz
cd Python-3.6.6
./configure
make altinstall
to install it (install
vs altinstall
explanation here Difference in details between "make install" and "make altinstall")You'll normally find your new python install under /usr/local/bin
. Now you can create a new virtualenv specifying the python version with:
virtualenv --python=python3.6 env3.6
source env3.6/source/bin/activate
.pip install tensorflow