[go: nahoru, domu]

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

pip3 install tensorflow fails on Python 3.7 #20790

Closed
lutzroeder opened this issue Jul 13, 2018 · 6 comments
Closed

pip3 install tensorflow fails on Python 3.7 #20790

lutzroeder opened this issue Jul 13, 2018 · 6 comments
Assignees
Labels
stat:awaiting response Status - Awaiting response from author

Comments

@lutzroeder
Copy link
Contributor
lutzroeder commented Jul 13, 2018

Have I written custom code
No

OS Platform and Distribution
macOS 10.13.6 (17G65)

TensorFlow installed from
install failed

TensorFlow version
latest

Bazel version
CUDA/cuDNN version
N/A

GPU model and memory
N/A

Exact command to reproduce

~: pip3 --version
pip 10.0.1 from /usr/local/lib/python3.7/site-packages/pip (python 3.7)
~: pip3 install tensorflow
Collecting tensorflow
  Could not find a version that satisfies the requirement tensorflow (from versions: )
No matching distribution found for tensorflow
@tensorflowbutler tensorflowbutler added the stat:awaiting response Status - Awaiting response from author label Jul 14, 2018
@tensorflowbutler
Copy link
Member

Thank you for your post. We noticed you have not filled out the following field in the issue template. Could you update them if they are relevant in your case, or leave them as N/A? Thanks.
Have I written custom code
OS Platform and Distribution
TensorFlow installed from
TensorFlow version
Bazel version
CUDA/cuDNN version
GPU model and memory
Exact command to reproduce

@glandon
Copy link
glandon commented Jul 14, 2018

Python 3.7.0 (default, Jun 29 2018, 20:13:13)
[Clang 9.1.0 (clang-902.0.39.2)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

import tensor as tf
Traceback (most recent call last):
File "", line 1, in
ModuleNotFoundError: No module named 'tensor'
import tensorf as tf
Traceback (most recent call last):
File "", line 1, in
ModuleNotFoundError: No module named 'tensorf'
import tensorflow as tf
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python3.7/site-packages/tensorflow/init.py", line 22, in
from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
File "/usr/local/lib/python3.7/site-packages/tensorflow/python/init.py", line 49, in
from tensorflow.python import pywrap_tensorflow
File "/usr/local/lib/python3.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in
from tensorflow.python.pywrap_tensorflow_internal import *
File "/usr/local/lib/python3.7/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 114
def TFE_ContextOptionsSetAsync(arg1, async):
^
SyntaxError: invalid syntax

@MyVanitar
Copy link
MyVanitar commented Jul 14, 2018

if you use Anaconda, you can use conda install -c hesi_m tensorflow to install tensorflow 1.9.0 for CPU

if you specifically use Keras also, you can use conda install -c hesi_m keras which installs Keras 2.2.0 in accompany with everything including tensorflow 1.9.0

It is better to make a fresh anaconda environment for your experiments

@lutzroeder
Copy link
Contributor Author
lutzroeder commented Jul 17, 2018

See #17022 and #20517

@lutzroeder lutzroeder changed the title pip3 install tensorflow fails on macOS pip3 install tensorflow fails on Python 3.7 / macOS Jul 17, 2018
@lutzroeder lutzroeder changed the title pip3 install tensorflow fails on Python 3.7 / macOS pip3 install tensorflow fails on Python 3.7 Jul 17, 2018
@rohanbanerjee
Copy link

@lutzroeder refer to the issue #20690.

and find anywhere the variable async is used and replace it with async1 so its not a python 3.7 keyword anymore. you will find those "async" variables on line 114, 115, 154 (for the tf version 1.10.0)
So this (for instance):
def TFE_ContextOptionsSetAsync(arg1, async):
becomes this:
def TFE_ContextOptionsSetAsync(arg1, async1):

This solved my issue!

@sertsedat
Copy link
sertsedat commented Jan 16, 2019

any update on the issue? I get this error on Windows 8

>pip --version
18.1

>py --version
3.7.2

>pip install tensorflow
Collecting tensorflow
  Could not find a version that satisfies the
ons: )
No matching distribution found for tensorflow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stat:awaiting response Status - Awaiting response from author
Projects
None yet
Development

No branches or pull requests

7 participants