tensorflow: Unable to install TensorFlow on Python3.7 with pip
System information
- Have I written custom code (as opposed to using a stock example script provided in TensorFlow): N/A
- OS Platform and Distribution (e.g., Linux Ubuntu 16.04): macOS 10.13
- TensorFlow installed from (source or binary): binary
- TensorFlow version (use command below): 1.8
- Python version: 3.7
- Bazel version (if compiling from source): N/A
- GCC/Compiler version (if compiling from source): N/A
- CUDA/cuDNN version: N/A
- GPU model and memory: N/A
- Exact command to reproduce:
pip install tensorflow
Describe the problem
Installing TensorFlow on Python3.7 with pip failed. Please see the failure log below.
Source code / logs
Could not find a version that satisfies the requirement tensorflow (from versions: ) No matching distribution found for tensorflow
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 46
- Comments: 148 (16 by maintainers)
I installed it successfully by
pip install https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.8.0-py3-none-any.whl. However, it seems that this wheel is not Python 3.7 compatible. The problem is thattensorflow/python/pywrap_tensorflow_internal.pycontainsasyncas variable names butasyncbecomes a keyword in python3.7 so it’s no longer available.Also, I noticed that the URL is only for Python 3.4, 3.5, 3.6 but I can’t find any other URLs. So probably we need to wait for the official Python 3.7-compatible package.
Why was this issue closed?
that’s work for me just try to use this one below pip install https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.8.0-py3-none-any.whl
same here.
@thuyen isn’t that why automated tests exist?
chriss-mbp:~ chris$ pip3 install tensorflow Collecting tensorflow Could not find a version that satisfies the requirement tensorflow (from versions: ) No matching distribution found for tensorflow
Any update on a fix for this? Thank you.
because of python 3.7 fully release, all production opencv are death because of tensorflow are incompatible. HELP pls!!!
pip install --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-0.12.0-py3-none-any.whl that’s which i use, python 3.7 on windows and it works.
It works fine for me by using command :
pip3 install https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.10.1-py3-none-any.whlPlease see doc from https://www.tensorflow.org/install/install_mac#the_url_of_the_tensorflow_python_package
This is preventing me from upgrading several projects to 3.7, fix ETA would be great.
I found this to work after searching for a while. I will leave this here as it might be useful for someone.
Tensorflow only supports Python 3.6 as of today. You can install a different version of python alongside your standard one. You need to:
tar -xvzf Python-3.6.6.tgzcd Python-3.6.6./configuremake altinstallto install it (installvsaltinstallexplanation here https://stackoverflow.com/questions/16018463/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.6source env3.6/source/bin/activate.pip install tensorflowproblem are not on mac platform!!!
all current problem are for linux platform, if you are using mac, no need to report it here, due to that mac platform got no issue at all
still can’t install it with python3.7
+1
try
python3 -m pip install --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-0.12.0-py3-none-any.whl
If you’re using x86_64 and any Linux distro, then you can find below GitHub repo to be useful.
https://github.com/evdcush/TensorFlow-wheels
I have tried and successfully installed into my machine.
If you want Tensorflow + GPU build, then you can choose which one you want using above Github repo page.
Cheers.
@PiotrWegrzyn,
See if the following works for you:
pip3 install --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.12.0-py3-none-any.whlI had same issue. Try this:
should be worked…
pip install --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.12.0-py3-none-any.whl not work for python 3.7.1
I just wanted to highlight that posting +1 or loosely connected remarks will spam mailboxes of about 65 people watching this thread (I bet many hope that the next notification will say that we got a release for Python 3.7).
To subscribe to notifications without writing a comment one can click “subscribe” button on the top-right of the page. I think that the numer of subsribers will be as good indication of interst in this problem to the maintatiners as writing “+1” but without notifying everyone else. Thank you 😃
Also, here is another highlight:
asyncwas actually introduced in Python 3.5, released in September 2015 - which was more than three years ago. And they had warned:Worked for me too on Mac , thanks!
TensorFlow currently not support python 3.7. but I have solved this issue (on windows 10) by using Python environments like virtualenv , conda.
first, you need to download python 3.5x or 3.6x >> https://www.python.org/downloads/ and install it to your machine. then you’ll need to create a virtual environment with Python 3.6 or 3.5. ( virtualenv -p {path to python.exe(3.6)} {environment name} ) .
finally, check your python version with activating the virtual environment.
I guess that TensorFLow does not support python yet 3.8.0 or this version don’t have support. I pass by this same problem, and I solved creating an environment of python 3.5.2 in Anaconda, and this work OK to me. Anticipating, If you’ll use the tensorflow-gpu you can go through the same problem, because don’t have support yet for CUDA 11, and from current cudnn version, so I needed to do a drowngrade too.
Please make sure Python interpreter you’re using must be 64 bit version , It solved the problem for me try it .
I thought Python was done with these breaking changes. But come on Google async as a variable name?
TensorFlow will have a 3.7 on pip when its dependencies have one. This, in particular, means protobuf. There are patches for protobuf making it possible to work on 3.7 (since November, roughly), but there hasn’t been a release yet.
Here’s a simple trick to get things working with 3.7, but only if you’re a tough moth*****r who doesn’t give a shit if things break:
(or whatever the correct wheel is) and:
Still unable to install TensorFlow on Python3.7 with pip. Perhaps should keep the issue open util a wheel is released.
How to build tendorflow-gpu with fix for python 3.7? @bstriner
@Bredding234 TensorFlow 2.0 (release candidate 0) has pips for 3.7 on windows, see #31431 . Please try that version and let us know if it is not working.
@cskonopka what operating system are you using? Are you in a virtualenv? Please make sure the same python interpreter used for installing is also used for testing. For example, you could do:
And this should not fail.
it worked for me. thanks
Any suggestions for linux?
tensorflow-1.12.0-cp36-cp36m-linux_x86_64.whl is not a supported wheel on this platform.
Just want you to know that this worked fantastically. Thanks!
TL;DR if you want the TF official packages to work, bug eigen and protobuf to make new releases.
Has been fixed on master for a while but if you’re waiting for a release that supports py3.7 it might be a little bit. So basically, until you see a post here saying that that has happened, the official pip install isn’t going to work, but you can:
Last eigen release was 23.07.2018 and last protobuf release was Jul 31 as of this posting (AFAIK). Both need fixes to support py3.7. I think as of now those fixes are in master but not in releases, but I could be wrong. TF isn’t going to release an official package that depends on unreleased or patched third-party stuff if it can be avoided.
I’m not really involved in either of those two libraries so I’m curious about the status of those issues, too. TF problems are easy to fix and release. Third-party libraries not-so-much. If it was just TF problems, then Python 3.7 would’ve been supported officially in no time.
I fixed this issue on python 3.8 using this : 1/ Go to the directory of Scipts in your python in my case : C:\Python\Python38-32\Scripts 2/ in Cmd type : cd C:\Python\Python38-32\Scripts Then type : pip install https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.8.0-py3-none-any.whl
this worked for me too. Thanks
Yes like me
Please make sure Python interpreter you’re using must be 64 bit version , It solved the problem for me try it .
It seems like most people recognize the problem has been fixed. i just loaded it onto a fresh install of Rapsbian buster today. it comes with python 3.7.3. but the pip is 18.1 and if you look on the site documentation for tensorflow they want PIP to be >19.0. SO i had to python3 -m pip install–upgrade pip
and then check pip3 --version
to be sure it was at 19.2 then I ran
sudo pip3 install tensorflow (there were write permissions for one library) and it worked fine
@SalihOsman1 Check your python --version, you should install python package for 64-bit.
This worked for me:
python -m pip install https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.12.0-py3-none-any.whl
+1
+1
Hi Nasser, unfortunately Tensorflow doesn’t work with Python v3.7 yet. You’ll have to uninstall, go into Python’s website and install Python v3.6. The good thing is there are not many differences 😃 Just be sure to reinstall all your packages. I personally took a screenshot of all my packages (i.e. go into command prompt, and type in pip list, then take a screenshot) and referred to them to install everything again.
Cheers
I’m almost certain the 0.12 is because of a typo in the original comment. Installing https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.12.0-py3-none-any.whl works for me:
Note that the
RuntimeWarningis just a warning.Hi, Harpone.
I tried your trick, but I received this message:
/home/adriano/anaconda3/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: compiletime version 3.6 of module ‘tensorflow.python.framework.fast_tensor_util’ does not match runtime version 3.7 return f(*args, **kwds)
but… I saw that I don’t receive an error message when I import the tensorflow module in my script.
same question as the whole above~ has it fixed or updated?
same error here with python3.6 on nvidia jetson
@ravi-ai-cons please don’t update closed issues with “worked for me, thanks” messages as these messages send unnecessary emails to everyone who replied on the issue and these message have no real content.
please, I use ubuntu python 3.8.0 pip 19.3.1 I find this problem when i install tensorflow “could not find a version that satisfies the requirement tensorflow (from versions none)”
https://github.com/tensorflow/tensorflow/issues/32627
For 32bits versus 64 bits Python interpreters, check #32315 and #31431
To debug why you cannot install tensorflow,
pip debug --verboseshould display the list of tags your environment supports. Then check out the download files (here for 2.0, but you can check others too) and see if your tag is in there. If it is, then it is an issue for us, otherwise this shouldn’t be an issue opened in the repository.When can we expect to have Tensorflow for Python 3.7 on PIP? When you include it in another package as a dependency other options do not work.
Okay guys… Spent two hours. Quick workaround for now: It’s as simple as… Use
python3.6.5_1for now. Launch your tensorflow-based applications with the full path to the older python executable.Just make sure you manage to install this python version using homebrew or some other way. Now everything else can use regular up-to-date python 3.7, while we wait for TensorFlow devs to fix this.
Well this doesn’t work for me. After the download with pip finished it says no module named tensorflow
somebody could help me ! I’ve already installed python 3.7.1 wanna install tensor-flow but i can’t any one who could tell me how to fix this problem
Worked for me, python 3.7 on Mac.
Installation works as described above by @liutingchen , but when I run
import tensorflowI still get errors (… is my home path):import tensorflowTraceback (most recent call last): File "<stdin>", line 1, in <module> File "/.../python3_env/lib/python3.7/site-packages/tensorflow/__init__.py", line 22, in <module> from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import File "/.../python3_env/lib/python3.7/site-packages/tensorflow/python/__init__.py", line 49, in <module> from tensorflow.python import pywrap_tensorflow File "/.../python3_env/lib/python3.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in <module> from tensorflow.python.pywrap_tensorflow_internal import * File "/.../python3_env/lib/python3.7/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 114 def TFE_ContextOptionsSetAsync(arg1, async): ^ SyntaxError: invalid syntaxworks for me!
@Mahamatnour It doesn’t work for me.