ImportError loading tensorflow module - python-3.x

I have problem during import tensorflow.
Here is my recent stack trace:
(tensorflow) C:\Users\Vaidik>python
Python 3.5.5 |Anaconda, Inc.| (default, Apr 7 2018, 04:52:34) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
Traceback (most recent call last):
File "F:\Software\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "F:\Software\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "F:\Software\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
File "F:\Software\Anaconda\envs\tensorflow\lib\imp.py", line 243, in load_module
return load_dynamic(name, filename, file)
File "F:\Software\Anaconda\envs\tensorflow\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:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "F:\Software\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\__init__.py", line 22, in <module>
from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
File "F:\Software\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\__init__.py", line 49, in <module>
from tensorflow.python import pywrap_tensorflow
File "F:\Software\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 74, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "F:\Software\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "F:\Software\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "F:\Software\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
File "F:\Software\Anaconda\envs\tensorflow\lib\imp.py", line 243, in load_module
return load_dynamic(name, filename, file)
File "F:\Software\Anaconda\envs\tensorflow\lib\imp.py", line 343, in load_dynamic
return _load(spec)
ImportError: DLL load failed: The specified module could not be found.
Failed to load the native TensorFlow runtime.
See https://www.tensorflow.org/install/install_sources#common_installation_problems
for some common reasons and solutions. Include the entire stack trace
above this error message when asking for help.

Please try to create a conda environment for the required python version and install tensorflow.
Follow the below steps:
conda create -n tf35 -c intel python=3.5 pip numpy
(tf35 is the environment name)
activate tf35
conda install -c anaconda tensorflow
Thanks

Uninstall tf using
conda uninstall tensorflow
then install it again
python3 -m pip install tensorflow==1.8.0 --user

Related

Tensorflow 15.2 with Python 3.7.3 running in raspberry pi 4

I have python 3.7.3 and Tensorflow 15.2 installed in raspberry pi 4. When I tried to do import Tensorflow as TD, it failed to load the native Tensorflow runtimes. Can you please help and advise how to resolve the following issue?
pi#raspberrypi:
~ $ python Python 3.7.3 (default, Jan 22 2021, 20:04:44) [GCC 8.3.0] on linux Type "help",
"copyright",
"credits" or "license" for more information.
import tensorflow as tf Traceback (most recent call last):
File "/home/pi/.local/lib/python3.7/site-packages/tensorflow/python/pywrap_tensorflow.py",
line 58,
in from tensorflow.python.pywrap_tensorflow_internal import *
File "/home/pi/.local/lib/python3.7/site-packages/tensorflow/python/pywrap_tensorflow_internal.py",
line 28,
in _pywrap_tensorflow_internal = swig_import_helper() File "/home/pi/.local/lib/python3.7/site-packages/tensorflow/python/pywrap_tensorflow_internal.py",
line 24,
in swig_import_helper _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description) File "/usr/lib/python3.7/imp.py",
line 242,
in load_module return load_dynamic(name, filename, file) File "/usr/lib/python3.7/imp.py",
line 342,
in load_dynamic return _load(spec)
ImportError: /home/pi/.local/lib/python3.7/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so:
undefined symbol: _PyThreadState_Current
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "",
line 1,
in File "/home/pi/.local/lib/python3.7/site-packages/tensorflow/init.py",
line 24,
in from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import File "/home/pi/.local/lib/python3.7/site-packages/tensorflow/python/init.py",
line 49,
in from tensorflow.python import pywrap_tensorflow File "/home/pi/.local/lib/python3.7/site-packages/tensorflow/python/pywrap_tensorflow.py",
line 74,
in raise ImportError(msg) ImportError:
Traceback (most recent call last):
File "/home/pi/.local/lib/python3.7/site-packages/tensorflow/python/pywrap_tensorflow.py",
line 58,
in from tensorflow.python.pywrap_tensorflow_internal import * File "/home/pi/.local/lib/python3.7/site-packages/tensorflow/python/pywrap_tensorflow_internal.py",
line 28,
in _pywrap_tensorflow_internal = swig_import_helper() File "/home/pi/.local/lib/python3.7/site-packages/tensorflow/python/pywrap_tensorflow_internal.py",
line 24,
in swig_import_helper _mod = imp.load_module('_pywrap_tensorflow_internal',
fp,
pathname, description) File "/usr/lib/python3.7/imp.py",
line 242,
in load_module return load_dynamic(name, filename, file) File "/usr/lib/python3.7/imp.py",
line 342,
in load_dynamic return _load(spec) ImportError: /home/pi/.local/lib/python3.7/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so:
undefined symbol: _PyThreadState_Current
Failed to load the native TensorFlow runtime.
See https://www.tensorflow.org/install/errors for some common reasons and solutions. Included the entire stack trace above this error message when asking for help.

py3.7 TensorFlow The specified module could not be found

As above, I have a problem importing tensorflow.
Here is the output with the IDLE:
Python 3.7.6 (tags/v3.7.6:43364a7ae0, Dec 19 2019, 00:42:30) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license()" for more information.
>>> import tensorflow as tf
Traceback (most recent call last):
File "C:\Users\sungn_000\AppData\Local\Programs\Python\Python37\lib\site-packa
ges\tensorflow_core\python\pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\Users\sungn_000\AppData\Local\Programs\Python\Python37\lib\site-packa
ges\tensorflow_core\python\pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\Users\sungn_000\AppData\Local\Programs\Python\Python37\lib\site-packa
ges\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\sungn_000\AppData\Local\Programs\Python\Python37\lib\imp.py", l
ine 242, in load_module
return load_dynamic(name, filename, file)
File "C:\Users\sungn_000\AppData\Local\Programs\Python\Python37\lib\imp.py", l
ine 342, 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:
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
import tensorflow as tf
File "C:\Users\sungn_000\AppData\Local\Programs\Python\Python37\lib\site-packa
ges\tensorflow\__init__.py", line 101, in <module>
from tensorflow_core import *
File "C:\Users\sungn_000\AppData\Local\Programs\Python\Python37\lib\site-packa
ges\tensorflow_core\__init__.py", line 40, in <module>
from tensorflow.python.tools import module_util as _module_util
File "C:\Users\sungn_000\AppData\Local\Programs\Python\Python37\lib\site-packa
ges\tensorflow\__init__.py", line 50, in __getattr__
module = self._load()
File "C:\Users\sungn_000\AppData\Local\Programs\Python\Python37\lib\site-packa
ges\tensorflow\__init__.py", line 44, in _load
module = _importlib.import_module(self.__name__)
File "C:\Users\sungn_000\AppData\Local\Programs\Python\Python37\lib\importlib\__init__.py", line 1
27, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "C:\Users\sungn_000\AppData\Local\Programs\Python\Python37\lib\site-packa
ges\tensorflow_core\python\__init__.py", line 49, in <module>
from tensorflow.python import pywrap_tensorflow
File "C:\Users\sungn_000\AppData\Local\Programs\Python\Python37\lib\site-packa
ges\tensorflow_core\python\pywrap_tensorflow.py", line 74, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "C:\Users\sungn_000\AppData\Local\Programs\Python\Python37\lib\site-packa
ges\tensorflow_core\python\pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\Users\sungn_000\AppData\Local\Programs\Python\Python37\lib\site-packa
ges\tensorflow_core\python\pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\Users\sungn_000\AppData\Local\Programs\Python\Python37\lib\site-packa
ges\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\sungn_000\AppData\Local\Programs\Python\Python37\lib\imp.py", line 2
42, in load_module
return load_dynamic(name, filename, file)
File "C:\Users\sungn_000\AppData\Local\Programs\Python\Python37\lib\imp.py", line 3
42, in load_dynamic
return _load(spec)
ImportError: DLL load failed: The specified module could not be found.
Failed to load the native TensorFlow runtime.
See https://www.tensorflow.org/install/errors
for some common reasons and solutions. Include the entire stack trace
above this error message when asking for help.
I'm using Windows 8.1 64-bit, Python 3.7. Installed tensorflow 2.1.0 with pip install tensorflow.
Saw some GitHub issues and some Stack Overflow questions, but none of them fixed the issue.
Didn't install CUDA or something else. Is this effective with this?
What is wrong with this??
EDIT Sorry, installed Tensorflow with Anaconda (latest). Made an enviroment in it.
**
You Need To setup first Virtual Environment for Tensorflow
**
then
pip install --upgrade tensorflow
after install please Verify the install:
python -c "import tensorflow as tf;print(tf.reduce_sum(tf.random.normal([1000, 1000])))"

Error in python after 'import tensorflow' on windows [duplicate]

This question already has an answer here:
Tensorflow 2.0 on Windows (SSE2): How do you stop 'ImportError: DLL load failed: The specified module could not be found.' when importing tensorflow
(1 answer)
Closed 2 years ago.
After install TensorFlow for Python3 and type "import tensorflow" it wrote this long error.
Any ideas how to fix it?
C:\Users\marsa>python
Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 22:22:05) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow
Traceback (most recent call last):
File "C:\Users\marsa\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\Users\marsa\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\Users\marsa\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
File "C:\Users\marsa\AppData\Local\Programs\Python\Python37\lib\imp.py", line 242, in load_module
return load_dynamic(name, filename, file)
File "C:\Users\marsa\AppData\Local\Programs\Python\Python37\lib\imp.py", line 342, in load_dynamic
return _load(spec)
ImportError: DLL load failed: Proces inicializace dynamicky připojované knihovny (DLL) se nezdařil.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\marsa\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\__init__.py", line 28, in <module>
from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
File "C:\Users\marsa\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\__init__.py", line 49, in <module>
from tensorflow.python import pywrap_tensorflow
File "C:\Users\marsa\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 74, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "C:\Users\marsa\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\Users\marsa\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\Users\marsa\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
File "C:\Users\marsa\AppData\Local\Programs\Python\Python37\lib\imp.py", line 242, in load_module
return load_dynamic(name, filename, file)
File "C:\Users\marsa\AppData\Local\Programs\Python\Python37\lib\imp.py", line 342, in load_dynamic
return _load(spec)
ImportError: DLL load failed: Proces inicializace dynamicky připojované knihovny (DLL) se nezdařil.
Failed to load the native TensorFlow runtime.
What operating system are you using? Are you in a virtualenv? Please make sure the same python interpreter used for installing is also used for testing. For example, you could do:
python -m pip install tensorflow
python -c "import tensorflow"
And this should not fail.

having trouble install tensorflow

So I am learning deep learning. For convolutional neural networks purpose I need tensorflow. I installed tensorflow and several packages with the following command:
conda create -n tensorflow python=3.5
source activate tensorflow
conda install pandas matplotlib jupyter notebook scipy scikit-learn
pip install tensorflow
but then when I tried to run this it failed:
# Python
import tensorflow as tf
hello = tf.constant('Hello, TensorFlow!')
sess = tf.Session()
print(sess.run(hello))
anyone knows what went wrong thanks?
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tensorflow/python/__init__.py", line 61, in <module>
from tensorflow.python import pywrap_tensorflow
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow.py", line 28, in <module>
_pywrap_tensorflow = swig_import_helper()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow', fp, pathname, description)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/imp.py", line 243, in load_module
return load_dynamic(name, filename, file)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/imp.py", line 343, in load_dynamic
return _load(spec)
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tensorflow/python/_pywrap_tensorflow.so, 10): Library not loaded: #rpath/libcudart.8.0.dylib
Referenced from: /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tensorflow/python/_pywrap_tensorflow.so
Reason: image not found
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/yiransi/Documents/tensorflowtest.py", line 3, in <module>
import tensorflow as tf
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tensorflow/__init__.py", line 24, in <module>
from tensorflow.python import *
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tensorflow/python/__init__.py", line 72, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tensorflow/python/__init__.py", line 61, in <module>
from tensorflow.python import pywrap_tensorflow
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow.py", line 28, in <module>
_pywrap_tensorflow = swig_import_helper()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow', fp, pathname, description)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/imp.py", line 243, in load_module
return load_dynamic(name, filename, file)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/imp.py", line 343, in load_dynamic
return _load(spec)
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tensorflow/python/_pywrap_tensorflow.so, 10): Library not loaded: #rpath/libcudart.8.0.dylib
Referenced from: /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tensorflow/python/_pywrap_tensorflow.so
Reason: image not found
Failed to load the native TensorFlow runtime.
See https://github.com/tensorflow/tensorflow/blob/master/tensorflow/g3doc/get_started/os_setup.md#import_error
for some common reasons and solutions. Include the entire stack trace
above this error message when asking for help.
>>>

Tensorflow 1.5 on Raspberry Pi3

I followed these instructions to compile tensorflow:
https://github.com/samjabrahams/tensorflow-on-raspberry-pi/blob/master/GUIDE.md
I pulled the newest bazel (0.9.0)from github and compiled it successfully. After that I pulled the newest tensorflow (1.5.0) from github then applied this command
grep -Rl 'lib64' | xargs sed -i 's/lib64/lib/g'
I skipped the editing of tensorflow/workspace.bzl. Then I ran the configuration script and provided the paths for python 3.5. Compilation was after one night successful with following command from tutorial:
bazel build -c opt --copt="-mfpu=neon-vfpv4" --copt="-funsafe-math-optimizations" --copt="-ftree-vectorize" --copt="-fomit-frame-pointer" --local_resources 1024,1.0,1.0 --verbose_failures tensorflow/tools/pip_package:build_pip_package
Then I builded the package:
bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/tensorflow_pkg
Then the installation in python also worked without errors:
sudo pip3 install /tmp/tensorflow_pkg/tensorflow-1.5.0rc1-cp35-cp35m-linux_armv7l.whl --upgrade --force-reinstall
But then when I start python3 from my home directory and try to import tensorflow with: import tensorflow as tf following error appears:
Python 3.5.3 (default, Jan 19 2017, 14:11:04)
[GCC 6.3.0 20170124] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
File "/usr/lib/python3.5/imp.py", line 242, in load_module
return load_dynamic(name, filename, file)
File "/usr/lib/python3.5/imp.py", line 342, in load_dynamic
return _load(spec)
ImportError: /usr/local/lib/python3.5/dist-packages/tensorflow/python/_pywrap_tensorflow_internal.so: undefined symbol: _ZN10tensorflow9ConcatCPUINS_8bfloat16EEEvPNS_10DeviceBaseERKSt6vectorISt10unique_ptrINS_6TTypesIT_Li2EiE11ConstMatrixESt14default_deleteIS9_EESaISC_EEPNS8_6MatrixE
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.5/dist-packages/tensorflow/__init__.py", line 24, in <module>
from tensorflow.python import *
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/__init__.py", line 49, in <module>
from tensorflow.python import pywrap_tensorflow
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/pywrap_tensorflow.py", line 74, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
File "/usr/lib/python3.5/imp.py", line 242, in load_module
return load_dynamic(name, filename, file)
File "/usr/lib/python3.5/imp.py", line 342, in load_dynamic
return _load(spec)
ImportError: /usr/local/lib/python3.5/dist-packages/tensorflow/python/_pywrap_tensorflow_internal.so: undefined symbol: _ZN10tensorflow9ConcatCPUINS_8bfloat16EEEvPNS_10DeviceBaseERKSt6vectorISt10unique_ptrINS_6TTypesIT_Li2EiE11ConstMatrixESt14default_deleteIS9_EESaISC_EEPNS8_6MatrixE
Failed to load the native TensorFlow runtime.
See https://www.tensorflow.org/install/install_sources#common_installation_problems
for some common reasons and solutions. Include the entire stack trace
above this error message when asking for help.
How can I fix this? Thank you in advance!
It is looking for ConcatCPU defined here:
https://github.com/tensorflow/tensorflow/blob/r1.5/tensorflow/core/kernels/concat_lib_cpu.cc#L51
undefined symbol: _ZN10tensorflow9ConcatCPUINS_8bfloat16EEEvPNS_10DeviceBaseERKSt6vectorISt10unique_ptrINS_6TTypesIT_Li2EiE11ConstMatrixESt14default_deleteIS9_EESaISC_EEPNS8_6MatrixE
So there may be something wrong with your bazelrc.
You have multiple options:
1) Dig in your bazelrc and check that concat_lib_cpu.cc is being compiled, check that the linker sees it, etc.
2) RECOMMENDED - Simply download the package from ci.tensorflow.org and install:
Python 3: http://ci.tensorflow.org/view/Nightly/job/nightly-pi-python3/lastSuccessfulBuild/
Python 2: http://ci.tensorflow.org/view/Nightly/job/nightly-pi/lastSuccessfulBuild/
3) Use Tensorflow Lite if you can, remember RPIs are limitted.
Good luck.

Resources