tensorflow.python.framework.errors_impl.InternalError: Failed to create session.

root@tegra-ubuntu:/home/ubuntu# python3
Python 3.5.2 (default, Nov 23 2017, 16:37:01)
[GCC 5.4.0 20160609] on linux
Type “help”, “copyright”, “credits” or “license” for more information.

import tensorflow as tf
hello = tf.constant(‘Hello, TensorFlow!’)
sess = tf.Session()
2018-09-19 14:43:22.881269: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:864] ARM64 does not support NUMA - returning NUMA node zero
2018-09-19 14:43:22.881444: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1392] Found device 0 with properties:
name: NVIDIA Tegra X2 major: 6 minor: 2 memoryClockRate(GHz): 1.3005
pciBusID: 0000:00:00.0
totalMemory: 7.66GiB freeMemory: 4.73GiB
2018-09-19 14:43:22.881509: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1471] Adding visible gpu devices: 0

2018-09-19 14:43:24.454825: I tensorflow/core/common_runtime/gpu/gpu_device.cc:952] Device interconnect StreamExecutor with strength 1 edge matrix:
2018-09-19 14:43:24.454914: I tensorflow/core/common_runtime/gpu/gpu_device.cc:958] 0
2018-09-19 14:43:24.454951: I tensorflow/core/common_runtime/gpu/gpu_device.cc:971] 0: N
2018-09-19 14:43:24.455110: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1084] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 4339 MB memory) -> physical GPU (device: 0, name: NVIDIA Tegra X2, pci bus id: 0000:00:00.0, compute capability: 6.2)

2018-09-19 14:43:48.422490: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1471] Adding visible gpu devices: 0
2018-09-19 14:43:48.423235: E tensorflow/core/common_runtime/direct_session.cc:158] Internal: CUDA runtime implicit initialization on GPU:0 failed. Status: unknown error
Traceback (most recent call last):
File “”, line 1, in
File “/usr/local/lib/python3.5/dist-packages/tensorflow/python/client/session.py”, line 1563, in init
super(Session, self).init(target, graph, config=config)
File “/usr/local/lib/python3.5/dist-packages/tensorflow/python/client/session.py”, line 633, in init
self._session = tf_session.TF_NewSession(self._graph._c_graph, opts)
tensorflow.python.framework.errors_impl.InternalError: Failed to create session.

Duplicate to topic 1041798. Please check it for the response:


Thanks.and i try

i try,but it doesn’t work

Hi, shen222ying

Some users fix this issue by installing libhdf5-dev, python-h5py libraries:

sudo apt-get install libhdf5-dev
sudo apt-get install python-h5py

Could you also give it a try?
Here is our previous discussion for your reference: