<ul dir="auto">
<li>OS Platform and Distribution : CentOS Linux release 7.5.1804</li>
<li>TensorFlow installed from (source or binary): pip</li>
<li>Python version: 3.7.2</li>
<li>Installed using virtualenv? pip? conda?: pip</li>
</ul>
<p dir="auto">I get the following error when I try to import tensorflow:</p>
<p dir="auto">Traceback (most recent call last):<br>
File "/home/users/pjh/.local/lib/python3.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in <br>
from tensorflow.python.pywrap_tensorflow_internal import *<br>
File "/home/users/pjh/.local/lib/python3.7/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <br>
_pywrap_tensorflow_internal = swig_import_helper()<br>
File "/home/users/pjh/.local/lib/python3.7/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper<br>
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)<br>
File "/home/users/pjh/Python-3.7.3/Lib/imp.py", line 242, in load_module<br>
return load_dynamic(name, filename, file)<br>
File "/home/users/pjh/Python-3.7.3/Lib/imp.py", line 342, in load_dynamic<br>
return _load(spec)<br>
ImportError: /lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /home/users/pjh/.local/lib/python3.7/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so)</p>
<p dir="auto">During handling of the above exception, another exception occurred:</p>
<p dir="auto">Traceback (most recent call last):<br>
File "", line 1, in <br>
File "/home/users/pjh/.local/lib/python3.7/site-packages/tensorflow/<strong>init</strong>.py", line 24, in <br>
from tensorflow.python import pywrap_tensorflow  # pylint: disable=unused-import<br>
File "/home/users/pjh/.local/lib/python3.7/site-packages/tensorflow/python/<strong>init</strong>.py", line 49, in <br>
from tensorflow.python import pywrap_tensorflow<br>
File "/home/users/pjh/.local/lib/python3.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 74, in <br>
raise ImportError(msg)<br>
ImportError: Traceback (most recent call last):<br>
File "/home/users/pjh/.local/lib/python3.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in <br>
from tensorflow.python.pywrap_tensorflow_internal import *<br>
File "/home/users/pjh/.local/lib/python3.7/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <br>
_pywrap_tensorflow_internal = swig_import_helper()<br>
File "/home/users/pjh/.local/lib/python3.7/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper<br>
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)<br>
File "/home/users/pjh/Python-3.7.3/Lib/imp.py", line 242, in load_module<br>
return load_dynamic(name, filename, file)<br>
File "/home/users/pjh/Python-3.7.3/Lib/imp.py", line 342, in load_dynamic<br>
return _load(spec)<br>
ImportError: /lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /home/users/pjh/.local/lib/python3.7/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so)</p>
<p dir="auto">Failed to load the native TensorFlow runtime.</p>
<hr>
<p dir="auto">I am not the root user in the server.<br>
I installed python in my directory by downloading '<a href="https://www.python.org/ftp/python/3.7.3/Python-3.7.3.tgz" rel="nofollow">https://www.python.org/ftp/python/3.7.3/Python-3.7.3.tgz</a>'. Next I downloaded tensorflow by 'python3 -m pip install tensorflow --user' (python3 command is linked to the one installed in my directory). Then I executed 'python3' and tried to import tensorflow.</p>
<p dir="auto">Thank you so much.</p>
<p dir="auto"><em>Please make sure that this is a build/installation issue. As per our <a href="https://github.com/tensorflow/tensorflow/blob/master/ISSUES.md">GitHub Policy</a>, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:build_template</em></p>
<p dir="auto"><strong>System information</strong></p>
<ul dir="auto">
<li>OS Platform and Distribution (e.g., Linux Ubuntu 16.04): RedHat Enterprise Linux 7.6</li>
<li>Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device: n/a</li>
<li>TensorFlow installed from (source or binary): binary</li>
<li>TensorFlow version: 1.13.1</li>
<li>Python version: 2.7.2</li>
<li>Installed using virtualenv? pip? conda?: virtualenv+pip</li>
<li>Bazel version (if compiling from source): n/a</li>
<li>GCC/Compiler version (if compiling from source): n/a</li>
<li>CUDA/cuDNN version: n/a</li>
<li>GPU model and memory: n/a</li>
</ul>
<p dir="auto"><strong>Describe the problem</strong></p>
<p dir="auto">We noticed that TensorFlow 1.13.1 now comes with wheels for Python 3.7 as well:</p>
<p dir="auto">tensorflow-1.13.1-cp37-cp37m-manylinux1_x86_64.whl</p>
<p dir="auto">We first upgraded to 1.13.1 on our existing Python 3.6, which worked<br>
fine. Then we tried upgrading to Python 3.7, but even importing<br>
tensorflow fails there, because the shared libraries need a newer<br>
libstdc++:</p>
<p dir="auto">E   ImportError: Traceback (most recent call last):<br>
E     File "/home/anon/git/sensors/venv3/lib/python3.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in <br>
E       from tensorflow.python.pywrap_tensorflow_internal import *<br>
E     File "/home/anon/git/sensors/venv3/lib/python3.7/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <br>
E       _pywrap_tensorflow_internal = swig_import_helper()<br>
E     File "/home/anon/git/sensors/venv3/lib/python3.7/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper<br>
E       _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)<br>
E     File "/opt/anon/python-3.7.2-master-201903180831/lib/python3.7/imp.py", line 242, in load_module<br>
E       return load_dynamic(name, filename, file)<br>
E     File "/opt/anon/python-3.7.2-master-201903180831/lib/python3.7/imp.py", line 342, in load_dynamic<br>
E       return _load(spec)<br>
E   ImportError: /lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /home/anon/git/sensors/venv3/lib/python3.7/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so)<br>
E<br>
E<br>
E   Failed to load the native TensorFlow runtime.<br>
E<br>
E   See <a href="https://www.tensorflow.org/install/errors" rel="nofollow">https://www.tensorflow.org/install/errors</a><br>
E<br>
E   for some common reasons and solutions.  Include the entire stack trace<br>
E   above this error message when asking for help.</p>
<p dir="auto">This is error is logical, because RHEL/CentOS 7 only has support for 1.3.7 and earlier:</p>
<p dir="auto">(venv3) [anon@vdesk sensors]$ uname -a<br>
Linux vdesk.localdomain 3.10.0-957.5.1.el7.x86_64 <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="115886302" data-permission-text="Title is private" data-url="https://github.com/tensorflow/tensorflow/issues/1" data-hovercard-type="issue" data-hovercard-url="/tensorflow/tensorflow/issues/1/hovercard" href="https://github.com/tensorflow/tensorflow/issues/1">#1</a> SMP Wed Dec 19 10:46:58 EST 2018 x86_64 x86_64 x86_64 GNU/Linux<br>
(venv3) [anon@vdesk sensors]$ cat /etc/redhat-release<br>
Red Hat Enterprise Linux Server release 7.6 (Maipo)<br>
(venv3) [anon@vdesk sensors]$ strings /lib64/libstdc++.so.6 | grep CXXABI<br>
CXXABI_1.3<br>
CXXABI_1.3.1<br>
CXXABI_1.3.2<br>
CXXABI_1.3.3<br>
CXXABI_1.3.4<br>
CXXABI_1.3.5<br>
CXXABI_1.3.6<br>
CXXABI_1.3.7<br>
CXXABI_TM_1<br>
(venv3) [anon@vdesk sensors]$ gcc --version<br>
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-36)<br>
Copyright (C) 2015 Free Software Foundation, Inc.<br>
This is free software; see the source for copying conditions.  There is NO<br>
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.</p>
<p dir="auto">If you unzip the 3.6 and 3.7 wheels for TF 1.13.1, you can see that the 3.6 wheel is compiled on Ubuntu 14.04 with GCC 4.8:</p>
<p dir="auto">[anon@vdesk python]$ strings python36/tensorflow-1.13.1.data/purelib/tensorflow/libtensorflow_framework.so | grep -i ubuntu<br>
GCC: (Ubuntu 4.8.5-4ubuntu8~14.04.2) 4.8.5</p>
<p dir="auto">and the 3.7 wheel is compiled on Ubuntu 16.04 with GCC 5.4:</p>
<p dir="auto">[anon@vdesk python]$ strings python37/tensorflow-1.13.1.data/purelib/tensorflow/libtensorflow_framework.so | grep -i ubuntu<br>
GCC: (Ubuntu 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609</p>
<p dir="auto">RHEL/CentOS 7 also has GCC 4.8.x, so that's why the Python 3.6 wheels work.</p>
<p dir="auto">Is there any chance you could build the Python 3.7 wheels on Ubuntu 14.04 as well?</p>
<p dir="auto"><strong>Provide the exact sequence of commands / steps that you executed before running into the problem</strong></p>
<p dir="auto">Just importing tensorflow; works fine with the Python3.6 wheels.</p>
<p dir="auto"><strong>Any other info / logs</strong><br>
Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached.</p>