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

Is python 3.7.x supported with Tensorflow #17022

Closed
guppy57 opened this issue Feb 15, 2018 · 137 comments
Closed

Is python 3.7.x supported with Tensorflow #17022

guppy57 opened this issue Feb 15, 2018 · 137 comments

Comments

@guppy57
Copy link

guppy57 commented Feb 15, 2018

Ive been trying to install Tensorflow on my computer which currently runs python 3.7, however I keep running into some common issues... And each time i try to use the solutions provided, nothing works.

Im not sure, but Im guessing python 3.7 might not be supported considering the official Tensorflow page has no link to python 3.7, that maybe this is the reason I havent been able to correctly install Tensorflow.

@guppy57 guppy57 closed this as completed Feb 15, 2018
@shoyer
Copy link
Contributor

shoyer commented Feb 15, 2018

Python 3.7 isn't eventually officially supported by Python. It's still in beta testing, and very much under active development.

For now, stick with Python 3.6.

@imzhengk
Copy link

imzhengk commented Apr 1, 2018

now,it's ok.

@swstephe
Copy link

swstephe commented Jul 2, 2018

Python 3.7 appears to be official now, ("final release" on June 27th).

@activatedgeek
Copy link

I don't think Python 3.7 support is ready yet. For homebrew users landing on this page, simply point to an older Formula file for Python.

brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/f2a764ef944b1080be64bd88dca9a1d80130c558/Formula/python.rb

I found this from https://github.com/Homebrew/homebrew-core/commits/master/Formula/python.rb.

@2sn
Copy link

2sn commented Jul 14, 2018

I sill get

> pip3 install -U  tensorflow
Collecting tensorflow
  Could not find a version that satisfies the requirement tensorflow (from versions: )
No matching distribution found for tensorflow

@j543453
Copy link

j543453 commented Jul 16, 2018

I am getting the same ^

@kalanka29
Copy link

kalanka29 commented Jul 16, 2018

I am trying to use tensorflow to differentiate cats and dogs images (following this tutorial: )on python 3.7 .but i get the following error ..

`Traceback (most recent call last):
  File "C:\Users\donka\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 18, in swig_import_helper
    fp, pathname, description = imp.find_module('_pywrap_tensorflow', [dirname(__file__)])
  File "C:\Users\donka\AppData\Local\Programs\Python\Python37\lib\imp.py", line 297, in find_module
    raise ImportError(_ERR_MSG.format(name), name=name)
ImportError: No module named '_pywrap_tensorflow'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\donka\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\__init__.py", line 54, in <module>
    from tensorflow.python import pywrap_tensorflow
  File "C:\Users\donka\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 28, in <module>
    _pywrap_tensorflow = swig_import_helper()
  File "C:\Users\donka\AppData\Local\Programs\Python\Python37\lib\site-
```packages\tensorflow\python\pywrap_tensorflow.py", line 20, in swig_import_helper
    import _pywrap_tensorflow
ModuleNotFoundError: No module named '_pywrap_tensorflow'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\donka\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\__init__.py", line 24, in <module>
    from tensorflow.python import *
  File "C:\Users\donka\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\__init__.py", line 60, in <module>
    raise ImportError(msg)
ImportError: Traceback (most recent call last):
  File "C:\Users\donka\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 18, in swig_import_helper
    fp, pathname, description = imp.find_module('_pywrap_tensorflow', [dirname(__file__)])
  File "C:\Users\donka\AppData\Local\Programs\Python\Python37\lib\imp.py", line 297, in find_module
    raise ImportError(_ERR_MSG.format(name), name=name)
ImportError: No module named '_pywrap_tensorflow'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\donka\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\__init__.py", line 54, in <module>
    from tensorflow.python import pywrap_tensorflow
  File "C:\Users\donka\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 28, in <module>
    _pywrap_tensorflow = swig_import_helper()
  File "C:\Users\donka\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 20, in swig_import_helper
    import _pywrap_tensorflow
ModuleNotFoundError: No module named '_pywrap_tensorflow'


Error importing tensorflow.  Unless you are using bazel,
you should not try to import tensorflow from its source directory;
please exit the tensorflow source tree, and relaunch your python interpreter
from there.`

Is this regard to the compatibility of 3.7python version with tensorflow ...plz help

@j543453
Copy link

j543453 commented Jul 16, 2018

I changed my python interpreter to Python 3.6 64 bit rather than 3.7 and it now works, no longer getting import errors or:

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

@erolrecep
Copy link

You can install tensorflow on mac with pre-built wheel, https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.9.0-py3-none-any.whl . However, it gives syntax error when you import.

@ramaakkantvdas
Copy link

guys need help , i am unable to install tensorflow on python 3.7 .

should be re consider to downgrade it ?

@toby-w
Copy link

toby-w commented Aug 8, 2018

@ramaakkantvdas try downgrading to python 3.6 as suggested by @jaiken06. This worked for me as well.

@ramaakkantvdas
Copy link

@toby-w , thanks , but it worked using this line : python -m pip install --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-0.12.0-py3-none-any.whl

TensorFlow works on Python 3.7

@RobertoFranceschini
Copy link

RobertoFranceschini commented Aug 14, 2018

what version of tensorflow is this link? 0.12?
seems to not work with Keras, am I alone?

@KonnorTimmons1297
Copy link

Trying to install the Tensorflow API through pip in a virtual environment results in this:

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

Has tensorflow not officially been released yet?

@FatimaShahad
Copy link

Thanks ramaakkantvdas , I successfully installed the Tensorflow on my python 3.7 using the line you recommended but when I tried to import it, I got the following error, anyone know how to solve it, please?

Traceback (most recent call last):
File "C:\Python37\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 18, in swig_import_helper
fp, pathname, description = imp.find_module('_pywrap_tensorflow', [dirname(file)])
File "C:\Python37\lib\imp.py", line 297, in find_module
raise ImportError(_ERR_MSG.format(name), name=name)
ImportError: No module named '_pywrap_tensorflow'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Python37\lib\site-packages\tensorflow\python_init_.py", line 54, in
from tensorflow.python import pywrap_tensorflow
File "C:\Python37\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 28, in
_pywrap_tensorflow = swig_import_helper()
File "C:\Python37\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 20, in swig_import_helper
import _pywrap_tensorflow
ModuleNotFoundError: No module named '_pywrap_tensorflow'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "<pyshell#0>", line 1, in
import tensorflow
File "C:\Python37\lib\site-packages\tensorflow_init_.py", line 24, in
from tensorflow.python import *
File "C:\Python37\lib\site-packages\tensorflow\python_init_.py", line 60, in
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "C:\Python37\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 18, in swig_import_helper
fp, pathname, description = imp.find_module('_pywrap_tensorflow', [dirname(file)])
File "C:\Python37\lib\imp.py", line 297, in find_module
raise ImportError(_ERR_MSG.format(name), name=name)
ImportError: No module named '_pywrap_tensorflow'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Python37\lib\site-packages\tensorflow\python_init_.py", line 54, in
from tensorflow.python import pywrap_tensorflow
File "C:\Python37\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 28, in
_pywrap_tensorflow = swig_import_helper()
File "C:\Python37\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 20, in swig_import_helper
import _pywrap_tensorflow
ModuleNotFoundError: No module named '_pywrap_tensorflow'

Error importing tensorflow. Unless you are using bazel,
you should not try to import tensorflow from its source directory;
please exit the tensorflow source tree, and relaunch your python interpreter
from there.

@ramaakkantvdas
Copy link

hey guys i managed to install ,

but when i import tensorflow i got the following error .

import tensorflow as tf
Traceback (most recent call last):
File "C:\Users\ramaa\AppData\Local\Programs\Python\Python37-32\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 18, in swig_import_helper
fp, pathname, description = imp.find_module('_pywrap_tensorflow', [dirname(file)])
File "C:\Users\ramaa\AppData\Local\Programs\Python\Python37-32\lib\imp.py", line 297, in find_module
raise ImportError(_ERR_MSG.format(name), name=name)
ImportError: No module named '_pywrap_tensorflow'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\ramaa\AppData\Local\Programs\Python\Python37-32\lib\site-packages\tensorflow\python_init_.py", line 54, in
from tensorflow.python import pywrap_tensorflow
File "C:\Users\ramaa\AppData\Local\Programs\Python\Python37-32\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 28, in
_pywrap_tensorflow = swig_import_helper()
File "C:\Users\ramaa\AppData\Local\Programs\Python\Python37-32\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 20, in swig_import_helper
import _pywrap_tensorflow
ModuleNotFoundError: No module named '_pywrap_tensorflow'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "", line 1, in
File "C:\Users\ramaa\AppData\Local\Programs\Python\Python37-32\lib\site-packages\tensorflow_init_.py", line 24, in
from tensorflow.python import *
File "C:\Users\ramaa\AppData\Local\Programs\Python\Python37-32\lib\site-packages\tensorflow\python_init_.py", line 60, in
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "C:\Users\ramaa\AppData\Local\Programs\Python\Python37-32\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 18, in swig_import_helper
fp, pathname, description = imp.find_module('_pywrap_tensorflow', [dirname(file)])
File "C:\Users\ramaa\AppData\Local\Programs\Python\Python37-32\lib\imp.py", line 297, in find_module
raise ImportError(_ERR_MSG.format(name), name=name)
ImportError: No module named '_pywrap_tensorflow'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\ramaa\AppData\Local\Programs\Python\Python37-32\lib\site-packages\tensorflow\python_init_.py", line 54, in
from tensorflow.python import pywrap_tensorflow
File "C:\Users\ramaa\AppData\Local\Programs\Python\Python37-32\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 28, in
_pywrap_tensorflow = swig_import_helper()
File "C:\Users\ramaa\AppData\Local\Programs\Python\Python37-32\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 20, in swig_import_helper
import _pywrap_tensorflow
ModuleNotFoundError: No module named '_pywrap_tensorflow'

Error importing tensorflow. Unless you are using bazel,
you should not try to import tensorflow from its source directory;
please exit the tensorflow source tree, and relaunch your python interpreter
from there.

@ramaakkantvdas
Copy link

i am not sure how to go about from here ,.. can someone throw some light here ,.

Error is : No module named '_pywrap_tensorflow'

@FatimaShahad
Copy link

I think I solve my problem...I deleted the tensorflow folder in (Lib>site-packages)path and downloaded new tensor Zip file from this link https://github.com/tensorflow/tensorflow, then extracted it and put it instead of the older tensorflow

@ramaakkantvdas
Copy link

great Fatima ,i need to check and try i will get back and let you all know

@rohitkako
Copy link

yeah, i am facing the same issues with python 3.7

@SukeshP1995
Copy link

I am also facing same issues. I need a whl file of tensorflow-gpu. If anyone built it please mmail me to sukeshpabolu@gmail.com

@rubik
Copy link

rubik commented Aug 21, 2018

Is there an ETA for Python 3.7 support?

@ciribellialvaro
Copy link

Hello FatimaShahad, witch file did you get on the github? I found this list, but I don´t know witch file I have to download to follow your instruction... Can you help me?
By the way, I alread download the TensorFlow 0.12, that ramaakkantvdas recomended...

Thanks

c fix C++ header guards. 5 days ago
cc Replaced calls to tensorflow::StringPiece::ToString with string conve… 4 days ago
compiler Run AddSpecialCaseCopies in HloRematerialization. 2 days ago
contrib Expose the RegAdagradOptimizer (which allows the user to specify whet… 14 hours ago
core Make registration macro namespace-agnostic 2 days ago
docs_src Update TensorFlow.js roadmap 2 days ago
examples Replaced calls to tensorflow::StringPiece::ToString with string conve… 4 days ago
g3doc Remove usage of magic-api-link syntax from source files. 17 days ago
go Go: Update generated wrapper functions for TensorFlow ops. 2 days ago
java Merge pull request #21770 from skavulya:rename-ecosystem-jars 4 days ago
js Generate TypeScript Op attribute values for "type" and "int" OpDef at… 2 days ago
python compat: Update forward compatibility horizon to 2018-08-26 8 hours ago
security Merge pull request #20725 from yongtang:20722-TFSA-2018-001 a month ago
stream_executor Removed redundant std::string -> string conversions. 2 days ago
tools Upgrade Keras applications and Keras preprocessing. 2 days ago
.clang-format Add a .clang-format file for automatically formatting .cc/.h files. 2 years ago
BUILD Merge pull request #21122 from NervanaSystems:master 5 days ago
init.py fix cmake python 2.7 test import fail 2 months ago
api_template.init.py Internal Change. 2 months ago
tensorflow.bzl Merge pull request #21122 from NervanaSystems:master 5 days ago
tf_exported_symbols.lds Python library and C++ bindings for creating and compiling local XLA … 8 months ago
tf_framework_version_script.lds Merge changes from github. 2 months ago
tf_version_script.lds Python library and C++ bindings for creating and compiling local XLA … 8 months ago
version_check.bzl Rolling back tensorflow .bzl file changes 2 months ago
workspace.bzl [TF:XLA] Bump open source llvm revision to r340606 2 days ago

@ciribellialvaro
Copy link

sorry:
I meant "which" and not "witch"

@ciribellialvaro
Copy link

Now i´m with this problem:
Error importing tensorflow. Unless you are using bazel,
you should not try to import tensorflow from its source directory;
please exit the tensorflow source tree, and relaunch your python interpreter
from there.

@av8ramit
Copy link

Hey @StevenGann can you please clarify? Which version would you like supported on which OS? I believe TF supports Python3.7 on both CPU and GPU on all our supported OS-es which is why this issue was opened.

@Tugces
Copy link

Tugces commented Jul 28, 2019

pip install tensorflow==1.13.1
it works for me on Python 3.7
Good Luck.

@krishnadevz
Copy link

pip install tensorflow==1.13.1
it works for me on Python 3.7
Good Luck.

for me still not i think google team fix this patch otherwise you guys told me

@ali289
Copy link

ali289 commented Aug 16, 2019

hi
conda install -c hesi_m tensorflow
ok :-)

@krishnadevz
Copy link

@ali289 now problem is solved for tensorflow and python 3.7 you can access that thank you team

@hanzigs
Copy link

hanzigs commented Aug 27, 2019

Yes, python 3.7.3 with tensorflow 1.14.0 and keras 2.2.5, keras sequential model working perfect in Tornado API

@sahanruwanga
Copy link

Hi, I am still facing the problem of installing tensorflow in python 3.7. Can anyone help me to solve or any clarification?

@kalanka29
Copy link

kalanka29 commented Sep 12, 2019 via email

@kalanka29
Copy link

kalanka29 commented Sep 12, 2019 via email

@sahanruwanga
Copy link

@kalanka29 thanks for your information. is there a way to install tensorflow without anaconda? It works fine on anaconda and I need it without anaconda.

@metroid112
Copy link

image
Still having issues here, I believe we should be able to install tf on python 3.7 without anaconda.

@sahanruwanga
Copy link

image
Still having issues here, I believe we should be able to install tf on python 3.7 without anaconda.

Yeah! try python 64-bit version. tensorflow 2.0 is working fine for me in there!

@metroid112
Copy link

image
Still having issues here, I believe we should be able to install tf on python 3.7 without anaconda.

Yeah! try python 64-bit version. tensorflow 2.0 is working fine for me in there!

Thanks that worked! I wonder why I didn't have installed the x64 version

@heisenbug47
Copy link

OS : Windows 10 Pro
Python 3.7.6
Still not able to install Tensorflow in 2020.

image

@av8ramit
Copy link

av8ramit commented Feb 4, 2020

Your log says No matching distribution found for tensroflow

tensroflow

@heisenbug47
Copy link

Ahh got it..stupid typo !

@shailensobhee
Copy link

For those still experiencing issues with installing Tensorflow with Python 3.7, here is a proposed solution, especially if you are using Intel CPUs to run your workloads. In an activated conda environment with Python 3.7.x:

python -v
Python 3.7.6 (default, Jan  8 2020, 19:59:22)
[GCC 7.3.0] :: Anaconda, Inc. on linux

Execute:
conda install tensorflow=1.15

In the list of packages to be installed, you should see:
tensorflow pkgs/main/linux-64::tensorflow-1.15.0-mkl_py37h28c19af_0

This should install Tensorflow version 1.15 with the latest Intel MKL-DNN optimizations for best performance on Intel CPUs.

@lamberta
Copy link
Member

lamberta commented Feb 7, 2020

As mentioned in the pip install guide, Conda is not officially supported and is provided by the Conda community. And the last update looks like it was 4 months ago

@shailensobhee
Copy link

As mentioned in the pip install guide, Conda is not officially supported and is provided by the Conda community. And the last update looks like it was 4 months ago

Good point and good catch. Then, let's rephrase it differently: If the official pip method does not work for you, the community-supported method could help.

@taye1
Copy link

taye1 commented Feb 17, 2020

Traceback (most recent call last):
File "C:\Users\taye\Anaconda3\envs\tensor\lib\site-packages\tensorflow_core\python\pywrap_tensorflow.py", line 58, in
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\Users\taye\Anaconda3\envs\tensor\lib\site-packages\tensorflow_core\python\pywrap_tensorflow_internal.py", line 28, in
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\Users\taye\Anaconda3\envs\tensor\lib\site-packages\tensorflow_core\python\pywrap_tensorflow_internal.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
File "C:\Users\taye\Anaconda3\envs\tensor\lib\imp.py", line 243, in load_module
return load_dynamic(name, filename, file)
File "C:\Users\taye\Anaconda3\envs\tensor\lib\imp.py", line 343, in load_dynamic
return _load(spec)
ImportError: DLL load failed: The specified module could not be found.

During handling of the above exception, another exception occurred:

@vickykhan89
Copy link

Hi all,
pip install tensorflow==1.13.1
Its work for me, but when i create new project then there is tensorflow 2.1 avaliable, that doesnot work. How can i make tensorflow == 1.13.1 for every project same.
Please need help

@av8ramit
Copy link

@taye1

Please see: #36167 (comment)

@icoder-new
Copy link

icoder-new commented Mar 31, 2020

Hello guys!! I have a problem with installing Tensorflow!
Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 21:26:53) [MSC v.1916 32 bit (Intel)] on win32

How to install it ???

@mihaimaruseac
Copy link
Collaborator

TF does not work on 32 bits.

@ThePyProgrammer
Copy link

Is there an alternative to Tensorflow for 32-bit users?

@mihaimaruseac
Copy link
Collaborator

You can use Google Colab notebooks, just like other Google Drive files and have your code run in the cloud.

GCP also offers VMs suited for deep learning that could be used in the cloud

@Mayur-Debu
Copy link

Trying to install the Tensorflow API through pip in a virtual environment results in this:

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

Has tensorflow not officially been released yet?

it's released but,not supported yet,.... Downgrade it

@tensorflow tensorflow locked as resolved and limited conversation to collaborators Sep 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests