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

Creating a specific 3.6 binary for Linux #14182

Closed
KrishnaveniTK opened this issue Nov 2, 2017 · 89 comments
Closed

Creating a specific 3.6 binary for Linux #14182

KrishnaveniTK opened this issue Nov 2, 2017 · 89 comments
Assignees
Labels
stat:awaiting tensorflower Status - Awaiting response from tensorflower type:build/install Build and install issues

Comments

@KrishnaveniTK
Copy link

System information

  • Have I written custom code (as opposed to using a stock example script provided in TensorFlow): No
  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Linux Ubuntu 14.04
  • TensorFlow installed from (source or binary): Source
  • TensorFlow version (use command below):
  • Python version: Python3.6
  • Bazel version (if compiling from source):
  • GCC/Compiler version (if compiling from source): -NA-
  • CUDA/cuDNN version: -NA-
  • GPU model and memory: -NA-
  • Exact command to reproduce: import tensorflow as tf

Environment capture text:

https://github.com/tensorflow/tensorflow/tree/master/tools/tf_env_collect.sh
tf_env.txt

You can obtain the TensorFlow version with
python -c "import tensorflow as tf; print(tf.GIT_VERSION, tf.VERSION)"
This command also results in the same error.
/home/raju/anaconda3/lib/python3.6/importlib/_bootstrap.py:219: RuntimeWarning: compiletime version 3.5 of module 'tensorflow.python.framework.fast_tensor_util' does not match runtime version 3.6
return f(*args, **kwds)

Describe the problem

When importing tensorflow , I get this error. I found some information on "Feature request: nightly build for python 3.6 #12935" --"Yes, we unfortunately copy the 3.5 binary for 3.6 I'll look into creating a specific 3.6 binary for Linux."

Source code / logs

$import tensorflow as tf
result is
/home/raju/anaconda3/lib/python3.6/importlib/_bootstrap.py:219: RuntimeWarning: compiletime version 3.5 of module 'tensorflow.python.framework.fast_tensor_util' does not match runtime version 3.6
return f(*args, **kwds)

@jbboisseau
Copy link

same issue on MacOS 10.12.6

@rfarouni
Copy link

rfarouni commented Nov 2, 2017

same problem on Linux Ubuntu 16.04

@asimshankar
Copy link
Contributor

@gunan : Do we have any updates on the resources we have to support Python 3.6 releases?

@asimshankar asimshankar added stat:awaiting tensorflower Status - Awaiting response from tensorflower type:build/install Build and install issues labels Nov 2, 2017
@gunan
Copy link
Contributor

gunan commented Nov 2, 2017

@av8ramit looks like there were divergences which prevent us from using the same pip packages on python 3.5 and 3.6
Can we modify our builds to also build 3.6 version from scratch?

@YannDubs
Copy link

YannDubs commented Nov 3, 2017

Same issue on Linux CentOS 7

@knn1989
Copy link

knn1989 commented Nov 3, 2017

Same issue after upgrade Tensorflow from 1.3 to 1.4 on Mac High Sierra 10.13.1 using Python 3.6.2.
Tensorflow still works but give the above warning which is "RuntimeWarning: compiletime version 3.5 of module 'tensorflow.python.framework.fast_tensor_util' does not match runtime version 3.6"

@MichaelSnowden
Copy link

FWIW, python3.5 still works

@sbshah97
Copy link

sbshah97 commented Nov 3, 2017

ANything that can be changed here?

@wieberinsma
Copy link

wieberinsma commented Nov 3, 2017

Same problem using virtualenv after upgrading from Ubuntu 17.04 to 17.10.
/home/wiebe/virtual/tensorflow/lib/python3.6/importlib/_bootstrap.py:219: RuntimeWarning: compiletime version 3.5 of module 'tensorflow.python.framework.fast_tensor_util' does not match runtime version 3.6 return f(*args, **kwds)

@banifou
Copy link

banifou commented Nov 3, 2017

Same on Ubuntu 14.04

@dsitnik
Copy link

dsitnik commented Nov 3, 2017

Same issue on Fedora 26 with Python 3.6.2.

@seanxwzhang
Copy link

Same issue on OSX 10.12.5 with Python 3.6.3

@nqiao
Copy link

nqiao commented Nov 4, 2017

Same issue on OSX with Python 3.6.2

@erichiller
Copy link

Only posting because I didn't see my environment mentioned:
Clean 17.10 Ubuntu Server install on Python 3.6.3 (native pip install tensorflow-gpu)
Outputs:

/usr/lib/python3.6/importlib/_bootstrap.py:219: RuntimeWarning: compiletime version 3.5 of module 'tensorflow.python.framework.fast_tensor_util' does not match runtime version 3.6
  return f(*args, **kwds)

@h-jia
Copy link

h-jia commented Nov 5, 2017

I have tried both 3.5 and 3.6 (macOS High Sierra).
3.5 works perfect while 3.6 gives warns.
While 3.6 still works.

Hope this helps.

@AlphaSmartDog
Copy link

AlphaSmartDog commented Nov 5, 2017

same problem on Linux Ubuntu 17.10

Clean 17.10 Ubuntu Server install on Python 3.6.3 (native pip install tensorflow)

@february
Copy link

february commented Nov 5, 2017

Same issue on OSX 10.12.6 with Python 3.6.3(virtualenv installation)

import tensorflow as tf
/Users/zhanghao/virtualenv/tensorflow/lib/python3.6/importlib/_bootstrap.py:219: RuntimeWarning: compiletime version 3.5 of module 'tensorflow.python.framework.fast_tensor_util' does not match runtime version 3.6
return f(*args, **kwds)

@christiangda
Copy link

christiangda commented Nov 5, 2017

Same issue using this Docker file https://github.com/christiangda/kerasvideo/blob/master/Dockerfile

error:

import tensorflow as tf

/opt/conda/lib/python3.6/importlib/_bootstrap.py:219: RuntimeWarning: compiletime version 3.5 of module 'tensorflow.python.framework.fast_tensor_util' does not match runtime version 3.6
  return f(*args, **kwds)

@KrishnaveniTK
Copy link
Author

Hi,
Can you let me know if this has to be treated as a warning and ignored?
Furthermore the error is
from PyQt5 import QtCore, QtGui, QtWidgets
ImportError: dlopen: cannot load any more object with static TLS

See the Traceback below
Traceback (most recent call last):
File "train.py", line 51, in
from object_detection.builders import model_builder
File "/home/raju/anaconda3/envs/tensorflow/models/research/object_detection/builders/model_builder.py", line 29, in
from object_detection.meta_architectures import ssd_meta_arch
File "/home/raju/anaconda3/envs/tensorflow/models/research/object_detection/meta_architectures/ssd_meta_arch.py", line 31, in
from object_detection.utils import visualization_utils
File "/home/raju/anaconda3/envs/tensorflow/models/research/object_detection/utils/visualization_utils.py", line 24, in
import matplotlib.pyplot as plt
File "/home/raju/anaconda3/lib/python3.6/site-packages/matplotlib/pyplot.py", line 113, in
_backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup()
File "/home/raju/anaconda3/lib/python3.6/site-packages/matplotlib/backends/init.py", line 60, in pylab_setup
[backend_name], 0)
File "/home/raju/anaconda3/lib/python3.6/site-packages/matplotlib/backends/backend_qt5agg.py", line 16, in
from .backend_qt5 import (
File "/home/raju/anaconda3/lib/python3.6/site-packages/matplotlib/backends/backend_qt5.py", line 18, in
import matplotlib.backends.qt_editor.figureoptions as figureoptions
File "/home/raju/anaconda3/lib/python3.6/site-packages/matplotlib/backends/qt_editor/figureoptions.py", line 20, in
import matplotlib.backends.qt_editor.formlayout as formlayout
File "/home/raju/anaconda3/lib/python3.6/site-packages/matplotlib/backends/qt_editor/formlayout.py", line 56, in
from matplotlib.backends.qt_compat import QtGui, QtWidgets, QtCore
File "/home/raju/anaconda3/lib/python3.6/site-packages/matplotlib/backends/qt_compat.py", line 137, in
from PyQt5 import QtCore, QtGui, QtWidgets
ImportError: dlopen: cannot load any more object with static TLS

Pls let me know ways to resolve this error. Or will it be resolved only when the warning is resolved!!

@laoshaw
Copy link

laoshaw commented Nov 6, 2017

Same issues on Ubuntu 16.04 64bit virtualenv python3

@brian8128
Copy link

Does it break stuff or can I ignore the warning?

@dartdog
Copy link

dartdog commented Nov 7, 2017

Quite strange since the prior version worked fine with 3.6 (and it's packages), so it would seem that this should be a pretty simple fix?

@laoshaw
Copy link

laoshaw commented Nov 7, 2017

same issue with the just released 1.4 version...

@9034725985
Copy link

Just to add to what @dsitnik said, simple hello world to reproduce on Fedora 26 venv

$ cat requirements.txt 
bleach==1.5.0
enum34==1.1.6
html5lib==0.9999999
Markdown==2.6.9
numpy==1.13.3
protobuf==3.4.0
six==1.11.0
tensorflow==1.4.0
tensorflow-tensorboard==0.4.0rc2
Werkzeug==0.12.2
$ python --version
Python 3.6.2
$ cat app.py 
import tensorflow as tf

hello = tf.constant('Hello, TensorFlow!')
session = tf.Session()
print(session.run(hello))
$ python app.py 
/usr/lib64/python3.6/importlib/_bootstrap.py:205: RuntimeWarning: compiletime version 3.5 of module 'tensorflow.python.framework.fast_tensor_util' does not match runtime version 3.6
  return f(*args, **kwds)
2017-11-07 16:41:00.517173: I tensorflow/core/platform/cpu_feature_guard.cc:137] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2
b'Hello, TensorFlow!'

@GreggHelt2
Copy link
Contributor

GreggHelt2 commented Nov 8, 2017

Same issue on OSX 10.11.6, in an Anaconda virtual environment with Python 3.6.3 and attempting upgrade from TensorFlow 1.3 to 1.4.
Temporarily routed around this issue by creating a new Anaconda environment with Python 3.5.4 and Tensorflow 1.4, which is working fine.

@auroua
Copy link

auroua commented Dec 19, 2017

Same issue.

@quoniammm
Copy link

Same issue on Ubuntu 16.04 LTS.

@av8ramit
Copy link

av8ramit commented Dec 20, 2017

We are not offering a native python3.6 binary for mac anytime soon.

As for the cuda9 issue, tf-nightly is built from HEAD at master every night, and I believe the latest binaries require cuda9. Try using an older version of tf-nightly. (Maybe 1208 or something)

Windows has a native python3.6 binary so you will not see this issue.

@tylerlekang
Copy link

Thanks @av8ramit

For those who have the (arbitrary) preference of only wanting to use official releases, the following is correct?

  • you'll need to wait for 1.5.x for this warning message to go away when using Python 3.6 on linux
  • in the meantime, you can use 1.4.1 with no problems, you'll just see the warning message

@aishoot
Copy link

aishoot commented Dec 25, 2017

The same issue appears while I use Anaconda 3-5.0.1-Linux-x86_64.sh(Python3.6) and TensorFlow 1.4.

@eric-nok
Copy link

For what it's worth, the issue was discussed in a Hacker News thread about the 1.4 release (https://news.ycombinator.com/item?id=15647790). User allenlavoie responded:

It's just a small Cython-compiled utility throwing the warning, it works fine. Everything else is pure Python and so doesn't care about 3.5 vs 3.6. We will fix the warning, though (disclaimer: I work on TF and added fast_tensor_utils--sorry!).

@nji-syd
Copy link

nji-syd commented Dec 27, 2017

Dear Tensorflow QA team. Please add some unit tests!!! Happy NY

@arunmandal53
Copy link

You can create whl from source using following link steps. http://www.python36.com/install-tensorflow141-gpu/ . Let me informed if it worked.

@tensorflowbutler
Copy link
Member

Nagging Assignee: It has been 14 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

@av8ramit
Copy link

Official releases now (1.5+) have a native python3.6 image build on Ubuntu 16.04. We do not build a python3.6 specific binary for mac. Windows has native 3.6 as well.

@tylerlekang
Copy link

tylerlekang commented Jan 16, 2018

@av8ramit , I have 1.4.1 and you said that official releases now have .... yet,

When I do:
python3.6 -m pip install --upgrade --user tensorflow

It says that:
Requirement already up-to-date: tensorflow in ./.local/lib/python3.6/site-packages

@stevenlii
Copy link

stevenlii commented Jan 17, 2018

You guys could get python3.6 specific binary for mac/linux/windows from here:
https://pypi.python.org/pypi/tensorflow

@tylerlekang
Copy link

@av8ramit I manually downloaded 1.5.0rc1 cp36 manylinux wheel and installed successfully. The warning message has disappeared when import tensorflow in python 3.6

However, I think there is issue with pip. See below please. Do you need me to start a new issue, or am I just doing something wrong?

When I do:
python3.6 -m pip install --upgrade --user tensorflow -vvv

It does find the 1.5.0rc1 cp36 manylinux wheel, as well as rc0 and older version wheels (both rc and non-rc):

Found link https://pypi.python.org/packages/cd/e4/b2a8bcd1fa689489050386ec70c5c547e4a75d06f2cc2b55f45463cd092c/tensorflow-1.1.0-cp36-cp36m-manylinux1_x86_64.whl#md5=1f761290358dfb7fe4ec73140f4d282a (from https://pypi.python.org/simple/tensorflow/), version: 1.1.0
...
Found link https://pypi.python.org/packages/c6/1c/d64f9367cc3a50194e911ab9da865c2515cbc1fefa5e210ddebf85a61bac/tensorflow-1.2.0rc0-cp36-cp36m-manylinux1_x86_64.whl#md5=8a637f414bc16c86708c01f17c94f3f6 (from https://pypi.python.org/simple/tensorflow/), version: 1.2.0rc0
...
Found link https://pypi.python.org/packages/fe/7d/01c588ba060e5e7dffe64ab968745d143530c84da30296f9593f661ca27d/tensorflow-1.5.0rc0-cp36-cp36m-manylinux1_x86_64.whl#md5=6578302e0c843660464cc16ad45d6093 (from https://pypi.python.org/simple/tensorflow/), version: 1.5.0rc0
...
Found link https://pypi.python.org/packages/4e/50/87e3c6861957413deb5ccd62aee6cea85cc2eedcf6391183595191d3c87d/tensorflow-1.5.0rc1-cp36-cp36m-manylinux1_x86_64.whl#md5=501d5072275518056aa5a5f25a001015 (from https://pypi.python.org/simple/tensorflow/), version: 1.5.0rc1

but at the end this does not register somehow with pip to be the latest version:

Installed version (1.4.1) is most up-to-date (past versions: 0.12.1, 1.0.0, 1.0.1, 1.1.0, 1.2.0, 1.2.1, 1.3.0, 1.4.0, 1.4.1)
Requirement already up-to-date: tensorflow in ./.local/lib/python3.6/site-packages

I may be completely wrong, but it seems pip is not catching the versions with rc in the version number. I don't know if this is pip's error or tensorflow's error, but it seems to be an issue. Or am I wrong?

@attiasr
Copy link

attiasr commented Jan 17, 2018

@tylerlekang pip fetch the latest stable release by default (see https://pip.pypa.io/en/stable/reference/pip_install/#pre-release-versions)
and the pypi package of tensorflow is still a release candidate (1.5.0rc1)

try using:
pip install 'tensorflow>=1.5.0rc1'

@tylerlekang
Copy link

@attiasr Oh! Well ... that's embarrassing!

How long does it take the rc to turn into stable, and are there usually any changes once released as rc? Well I guess I can answer my own question by fact that there has already been rc0 and rc1 of 1.5.0 .....

Thanks!

@attiasr
Copy link

attiasr commented Jan 17, 2018

@tylerlekang np

@molyswu
Copy link

molyswu commented Mar 4, 2018

@ozkalt
Copy link

ozkalt commented Apr 29, 2018

Thanks @Karthick333031 it works for me (MacOS 10.12.6)

@umang6891
Copy link

umang6891 commented Aug 24, 2018

Running: pip3 install --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.10.0-py3-none-any.whl solved the issue

Python 3.6.5
TensorFlow 1.10.0 (Was previously 1.10.1)
MacOS 10.14

@hectorip
Copy link

Thanks,

@umang6891! It solved the problem for me. With the warning, my example hanged forever without failing, but now it runs. It looks like the problem is the version in pip.

screenshot 2018-08-24 23 38 35 👍

@zhangjunpeng9354
Copy link

@umang6891 's solution works good for me, and I am using a python3.6 virtualenv.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stat:awaiting tensorflower Status - Awaiting response from tensorflower type:build/install Build and install issues
Projects
None yet
Development

No branches or pull requests