Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to install TensorFlow on Python3.7 with pip #20444

Closed
natsukium opened this issue Jun 30, 2018 · 148 comments
Closed

Unable to install TensorFlow on Python3.7 with pip #20444

natsukium opened this issue Jun 30, 2018 · 148 comments
Assignees
Labels
stat:community support Status - Community Support type:build/install Build and install issues

Comments

@natsukium
Copy link

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

@roosephu
Copy link

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 that tensorflow/python/pywrap_tensorflow_internal.py contains async as variable names but async becomes 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.

@natsukium
Copy link
Author

Thank you for identifying the cause!

@iamtodor
Copy link

iamtodor commented Jul 23, 2018

still can't install it with python3.7

(env) mcbk:trainer todor$ pip3 install tensorflow
Collecting tensorflow
  Could not find a version that satisfies the requirement tensorflow (from versions: )
No matching distribution found for tensorflow
(env) mcbk:trainer todor$ which python3.7
/Users/todor/xor/projects/trainer/env/bin/python3.7
(env) mcbk:trainer todor$ which pip3
/Users/todor/xor/projects/trainer/env/bin/pip3

@dodiku
Copy link

dodiku commented Jul 25, 2018

same here.

@lihan
Copy link

lihan commented Aug 1, 2018

+1

@poxvoculi poxvoculi assigned martinwicke and unassigned poxvoculi Aug 1, 2018
@lolosssss
Copy link

Any update?

@chrisbenson
Copy link

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.

@Olshansk
Copy link

Olshansk commented Aug 4, 2018

Why was this issue closed?

@jparsert
Copy link

jparsert commented Aug 6, 2018

Has the problem with this wheel https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.8.0-py3-none-any.whl been fixed? Or rather what is the new link/version?

@thyeun
Copy link

thyeun commented Aug 7, 2018

because of python 3.7 fully release, all production opencv are death because of tensorflow are incompatible. HELP pls!!!!!!

@kontarsoma
Copy link

Same issue here..would be awesome to know when a fix is going to be available for this issue :)

@richardARPANET
Copy link

This is preventing me from upgrading several projects to 3.7, fix ETA would be great.

@thyeun
Copy link

thyeun commented Aug 8, 2018

@richardARPANET issue is we won't know what will happen before upgrade python 3.7, because nobody will go and check each module either it is compatible or not.

And due to that, after upgrade to python 3.7, everything become nightmare.

@richardARPANET
Copy link

@thuyen isn't that why automated tests exist?

@edwardzjl
Copy link

same here.

@prabhuasokan
Copy link

Same issue here too.

@christiaanleysen
Copy link

christiaanleysen commented Aug 14, 2018

Same issue here. Such a shame because I want to use it in cloud functions of GCP, which only supports 3.7 ATM...

@bstriner
Copy link
Contributor

@christiaanleysen works fine on 3.7 with some minor tweaks and patches if you're willing to build yourself: #21202

@mahamatnoumai
Copy link

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

@SukeshP1995
Copy link

SukeshP1995 commented Aug 17, 2018

How to build tendorflow-gpu with fix for python 3.7? @bstriner

@fatyArrammah
Copy link

same issue here,
python version 3.7
pip version 19.2
on windows 10

pip install tensorflow
ERROR: Could not find a version that satisfies the requirement tensorflow (from versions: none)
ERROR: No matching distribution found for tensorflow

Please make sure Python interpreter you're using must be 64 bit version , It solved the problem for me try it .

Yes like me

@premiumayodele
Copy link

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

it worked for me. thanks

this worked for me too. Thanks

@aynesss
Copy link

aynesss commented Dec 25, 2019

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)"

@mihaimaruseac
Copy link
Collaborator

@aynesss please read previous messages

In particular, your use case is covered by #20444 (comment) and #33374

@mihaimaruseac
Copy link
Collaborator

@ShriLingam23 this issue is about python3.7. So your solution about downgrading python 3.8 to 3.7.6 is out of scope. Please don't comment on closed issues as that only creates more confusion

@mihaimaruseac
Copy link
Collaborator

@NIravMeghani please stop spamming unrelated issues.

TF 1.8 is out of life for a few years already. Please use TF 1.15, 2.0 or 2.1.

TF has no support for python 8 at the moment. You can compile from source if you want to. We are working on releasing python 8 support soon.

In the future, please open a new issue instead of riding on the back on unrelated issues.

@ravi-ai-cons
Copy link

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

WORKED FOR ME TOO. Thanks.

@mihaimaruseac
Copy link
Collaborator

@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.

@KaberMed
Copy link

KaberMed commented Feb 2, 2020

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

@mihaimaruseac
Copy link
Collaborator

@KaberMed this issue is about python3.7, not python3.8. Please don't spam

@pintuprajapati
Copy link

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 that tensorflow/python/pywrap_tensorflow_internal.py contains async as variable names but async becomes 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.

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 that tensorflow/python/pywrap_tensorflow_internal.py contains async as variable names but async becomes 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.

This helped me, Thank you!
In VSC, Python 3.7.2

@LaureLazard
Copy link

https://www.tensorflow.org/install/pip says that a windows version for python 3.7 support exists for 64bit python.
pip install https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow_cpu-2.1.0-cp37-cp37m-win_amd64.whl which the page says is for windows using python 3.7 should work. if you get an error saying the wheel doesn't exist for this platform, that means you're using a 32bit python

@BabbiM
Copy link

BabbiM commented Feb 16, 2020

installed using the wheel file.

@donnadulcinea
Copy link

Please relase an updated version of tensorflow libraries for Java.

@svisavalia
Copy link

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 that tensorflow/python/pywrap_tensorflow_internal.py contains async as variable names but async becomes 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.

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 that tensorflow/python/pywrap_tensorflow_internal.py contains async as variable names but async becomes 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.

This helped me, Thank you!
In VSC, Python 3.7.2

I have successfully installed on Python3.7 but it shows this error.
File "C:\Python37-32\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 114
def TFE_ContextOptionsSetAsync(arg1, async):

Any solution to resolve this issue?

@svisavalia
Copy link

I have successfully installed tensorflow in Python3.7using pip install https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.8.0-py3-none-any.whl
but while using it, it shows this error.
File "C:\Python37-32\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 114
def TFE_ContextOptionsSetAsync(arg1, async):

Any solution to resolve this issue?

@jeemitsha
Copy link

I have successfully installed tensorflow in Python3.7using pip install https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.8.0-py3-none-any.whl
but while using it, it shows this error.
File "C:\Python37-32\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 114
def TFE_ContextOptionsSetAsync(arg1, async):

Any solution to resolve this issue?

Is it that tensorflow -1.8.0 is a older version???

@svisavalia
Copy link

I have successfully installed tensorflow in Python3.7using pip install https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.8.0-py3-none-any.whl
but while using it, it shows this error.
File "C:\Python37-32\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 114
def TFE_ContextOptionsSetAsync(arg1, async):
Any solution to resolve this issue?

Is it that tensorflow -1.8.0 is a older version???

Yes it is tensorflow 1.8.0. I have replaced async with async1 as async is keyword in python 3.7
So this problem is resolved.

But now I am having below mentioned error:

ImportError: No module named '_pywrap_tensorflow_internal'

@srikariralla
Copy link

On Mac OSX Catalina --pip install https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.8.0-py3-none-any.whl worked without any issues.

@MotiBaadror
Copy link

In my case, in the windows machine, I had same issue. I was using python 3.8. I made a new conda environment with python=3.6

conda create --name newenv python=3.6 
pip install tensorflow

@AlexisLapeze
Copy link

same error here with python3.6 on nvidia jetson

@PranaySoniSPAN

This comment has been minimized.

@unnati31

This comment has been minimized.

@vijayiner
Copy link

On Mac OSX Catalina --pip install https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.8.0-py3-none-any.whl worked without any issues.

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 that tensorflow/python/pywrap_tensorflow_internal.py contains async as variable names but async becomes 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.

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 that tensorflow/python/pywrap_tensorflow_internal.py contains async as variable names but async becomes 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.

This helped me, Thank you!
In VSC, Python 3.7.2

This works for Me!

@ahmedshingaly
Copy link

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

in my case this wheel did not work correctly
it throw below error

Python 3.7.9 (default, Aug 31 2020, 12:42:55)
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.

import tensorflow as tf
Traceback (most recent call last):
File "", line 1, in
File "/home/ahmed/anaconda3/envs/tf14/lib/python3.7/site-packages/tensorflow/init.py", line 24, in
from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
File "/home/ahmed/anaconda3/envs/tf14/lib/python3.7/site-packages/tensorflow/python/init.py", line 49, in
from tensorflow.python import pywrap_tensorflow
File "/home/ahmed/anaconda3/envs/tf14/lib/python3.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in
from tensorflow.python.pywrap_tensorflow_internal import *
File "/home/ahmed/anaconda3/envs/tf14/lib/python3.7/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 114
def TFE_ContextOptionsSetAsync(arg1, async):
^
SyntaxError: invalid syntax

@maxxyx96
Copy link

maxxyx96 commented Sep 21, 2020

Hi! Had a few dead ends but this worked out for me on python 3.6.9/3.8 (Updating setuptools to the latest version, then installing tensorflow):

Step 1: pip install -U pip
Step 2: pip install -U setuptools
Step 3: pip install tensorflow

source: liquidweb.com/kb/how-to-install-tensorflow-on-ubuntu-18-04/

@tensorflow tensorflow locked as resolved and limited conversation to collaborators Sep 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
stat:community support Status - Community Support type:build/install Build and install issues
Projects
None yet
Development

No branches or pull requests