Python3.7 is not compatible with Tensorflow? - python-3.x

I am trying to continue with a Rasa chatbot that I have not used since September and I find a syntax problem with the dependency of Tensorflow. I do not know if this is due to the fact that there are updates to be made with my dependencies or if it due to the fact that I use python3.7 as suggested by people on GitHub, or some other reason.
(moo_env) C:\Users\antoi\Documents\Programming\projects\moodbot>py train_online.py
Traceback (most recent call last):
File "train_online.py", line 37, in <module>
nlu_interpreter = RasaNLUInterpreter('./models/nlu/default/moodnlu')
File "C:\Users\antoi\Documents\Programming\projects\moodbot\moo_env\lib\site-packages\rasa_core\interpreter.py", line 221, in __init__
self._load_interpreter()
File "C:\Users\antoi\Documents\Programming\projects\moodbot\moo_env\lib\site-packages\rasa_core\interpreter.py", line 237, in _load_interpreter
self.interpreter = Interpreter.load(self.model_directory)
File "C:\Users\antoi\Documents\Programming\projects\moodbot\moo_env\lib\site-packages\rasa_nlu\model.py", line 276, in load
skip_validation)
File "C:\Users\antoi\Documents\Programming\projects\moodbot\moo_env\lib\site-packages\rasa_nlu\model.py", line 298, in create
components.validate_requirements(model_metadata.component_classes)
File "C:\Users\antoi\Documents\Programming\projects\moodbot\moo_env\lib\site-packages\rasa_nlu\components.py", line 49, in validate_requirements
from rasa_nlu import registry
File "C:\Users\antoi\Documents\Programming\projects\moodbot\moo_env\lib\site-packages\rasa_nlu\registry.py", line 23, in <module>
from rasa_nlu.classifiers.embedding_intent_classifier import \
File "C:\Users\antoi\Documents\Programming\projects\moodbot\moo_env\lib\site-packages\rasa_nlu\classifiers\embedding_intent_classifier.py", line 32, in <module>
import tensorflow as tf
File "C:\Users\antoi\Documents\Programming\projects\moodbot\moo_env\lib\site-packages\tensorflow\__init__.py", line 22, in <module>
from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
File "C:\Users\antoi\Documents\Programming\projects\moodbot\moo_env\lib\site-packages\tensorflow\python\__init__.py", line 49, in <module>
from tensorflow.python import pywrap_tensorflow
File "C:\Users\antoi\Documents\Programming\projects\moodbot\moo_env\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\Users\antoi\Documents\Programming\projects\moodbot\moo_env\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 114
def TFE_ContextOptionsSetAsync(arg1, async):
SyntaxError: invalid syntax
You can find my code in Github repository

The reason is this line in pywrap_tensorflow_internal.py:
def TFE_ContextOptionsSetAsync(arg1, async):
Since Python 3.5, async (and await) are keywords and can no longer be used as identifiers. I assume you use a very outdated version of tensorflow.

Related

While trying to encode a pointcloud I keep getting the same errors. I have tried to changing my environment and updating Glibcxx version and yet

$ python vmuc.py compress /home2/kubra/JPEG/Stanford_Area_2.ply ../models/Geometry-only/Codec/0.00025/checkpoint_best_loss.pth.tar ../results/G0.00025
Traceback (most recent call last):
File "/home2/kubra/JPEG/JPEG_PCC_VM/jpeg-pleno-pc-vm-main/src/vmuc.py", line 13, in <module>
import loss_functions
File "/home2/kubra/JPEG/JPEG_PCC_VM/jpeg-pleno-pc-vm-main/src/loss_functions.py", line 3, in <module>
from sklearn.neighbors import NearestNeighbors
File "/home/kubra/anaconda3/envs/myenv/lib/python3.9/site-packages/sklearn/__init__.py", line 82, in <module>
from .base import clone
File "/home/kubra/anaconda3/envs/myenv/lib/python3.9/site-packages/sklearn/base.py", line 17, in <module>
from .utils import _IS_32BIT
File "/home/kubra/anaconda3/envs/myenv/lib/python3.9/site-packages/sklearn/utils/__init__.py", line 29, in <module>
from .fixes import parse_version, threadpool_info
File "/home/kubra/anaconda3/envs/myenv/lib/python3.9/site-packages/sklearn/utils/fixes.py", line 19, in <module>
import scipy.stats
File "/home/kubra/anaconda3/envs/myenv/lib/python3.9/site-packages/scipy/stats/__init__.py", line 467, in <module>
from ._stats_py import *
File "/home/kubra/anaconda3/envs/myenv/lib/python3.9/site-packages/scipy/stats/_stats_py.py", line 39, in <module>
from scipy.spatial.distance import cdist
File "/home/kubra/anaconda3/envs/myenv/lib/python3.9/site-packages/scipy/spatial/__init__.py", line 105, in <module>
from ._kdtree import *
File "/home/kubra/anaconda3/envs/myenv/lib/python3.9/site-packages/scipy/spatial/_kdtree.py", line 5, in <module>
from ._ckdtree import cKDTree, cKDTreeNode
ImportError: /lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /home/kubra/anaconda3/envs/myenv/lib/python3.9/site-packages/scipy/spatial/_ckdtree.cpython-39-x86_64-linux-gnu.so)``
I'm currently working on point clouds codec. I tried encoding a point cloud but I keep getting the same error:
"/lib/x86_64-linux-gnu/libstdc++.so.6: version \`GLIBCXX_3.4.29' not found (required by /home/kubra/anaconda3/envs/myenv/lib/python3.9/site-packages/scipy/spatial/\_ckdtree.cpython-39-x86_64-linux-gnu.so)"
It says, apparently the version of GLIBCXX is not found whatsoever.. I tried updating my libstdc, creating new env with updated packages etc but it didnt workk for me. I have no idea of why it doesn't work and what I need to do. Could anyone please tell me what should I do?

Python version mismatch: module was compiled for Python 3.6, but the interpreter version is incompatible: 3.9.8

In order to install the newest tensorflow(2.7.0), I updated my python3 verison from 3.6.6 to 3.9.8. Here is how I do it inside my docker!!.
Download the Python-3.9.8.tgz file
1. tar -xf Python-3.9.8.tgz
2. cd Python-3.9.8 & ./configure --enable-optimizations
3. make -j 12
4. make altinstall
And my python3 --version is Python 3.9.8. However, as I am trying to load the newest tf by import tensorflow.compat.v1 as tf. Here comes the error:
File "/workspaces/model/task.py", line 120, in new_model_test
import model_api
File "/lfs/biomind/model_tmp/19bddfc44e8211ecbe172d8a58f5e38e/wmh_v2/model_api.py", line 3, in <module>
import tensorflow.compat.v1 as tf
File "/usr/local/lib/python3.6/site-packages/tensorflow/__init__.py", line 99, in <module>
from tensorflow_core import *
File "/usr/local/lib/python3.6/site-packages/tensorflow_core/__init__.py", line 28, in <module>
from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
File "/usr/local/lib/python3.6/site-packages/tensorflow/__init__.py", line 50, in __getattr__
module = self._load()
File "/usr/local/lib/python3.6/site-packages/tensorflow/__init__.py", line 44, in _load
module = _importlib.import_module(self.__name__)
File "/usr/local/lib/python3.9/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/usr/local/lib/python3.6/site-packages/tensorflow_core/python/__init__.py", line 49, in <module>
from tensorflow.python import pywrap_tensorflow
File "/usr/local/lib/python3.6/site-packages/tensorflow_core/python/pywrap_tensorflow.py", line 74, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/tensorflow_core/python/pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "/usr/local/lib/python3.6/site-packages/tensorflow_core/python/pywrap_tensorflow_internal.py", line 2453, in <module>
from tensorflow.python.util import deprecation
File "/usr/local/lib/python3.6/site-packages/tensorflow_core/python/util/deprecation.py", line 25, in <module>
from tensorflow.python.platform import tf_logging as logging
File "/usr/local/lib/python3.6/site-packages/tensorflow_core/python/platform/tf_logging.py", line 38, in <module>
from tensorflow.python.util.tf_export import tf_export
File "/usr/local/lib/python3.6/site-packages/tensorflow_core/python/util/tf_export.py", line 48, in <module>
from tensorflow.python.util import tf_decorator
File "/usr/local/lib/python3.6/site-packages/tensorflow_core/python/util/tf_decorator.py", line 64, in <module>
from tensorflow.python.util import tf_stack
File "/usr/local/lib/python3.6/site-packages/tensorflow_core/python/util/tf_stack.py", line 29, in <module>
from tensorflow.python import _tf_stack
ImportError: Python version mismatch: module was compiled for Python 3.6, but the interpreter version is incompatible: 3.9.8 (main, Nov 25 2021, 21:54:13)
[GCC 7.5.0].
Is there a way to change the compiled version of Python or do I do something which is not the right step? Thanks in advance.
For my question, the issue starts from File "/usr/local/lib/python3.6/site-packages/tensorflow/__init__.py". Though I installed Python3.9, python search python3.6 lib as well. The solution is simple: delete /usr/local/lib/python3.6/

ImportError: DLL load failed: The specified module could not be found. When trying to import tensorflow and keras into PyCharm

I have been trying to install and use tensorflow for the past week and I encountered a problem when importing it along with keras in PyCharm.
CPU:Intel(R) Core(TM) i7-7820HQ CPU # 2.90GHz
GPU:Intel(R) HD Graphics 630
This is what I put in the file:
import tensorflow
import keras
This is what appears in the PyCharm terminal when I run:
Traceback (most recent call last):
File "C:\Users\Bob\Anaconda3\envs\tensor\lib\site-packages\tensorflow_core\python\pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\Users\Bob\Anaconda3\envs\tensor\lib\site-packages\tensorflow_core\python\pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\Users\Bob\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\Bob\Anaconda3\envs\tensor\lib\imp.py", line 243, in load_module
return load_dynamic(name, filename, file)
File "C:\Users\Bob\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:
Traceback (most recent call last):
File "C:/Users/Bob/PycharmProjects/tensorenv/test.py", line 1, in <module>
import tensorflow
File "C:\Users\Bob\Anaconda3\envs\tensor\lib\site-packages\tensorflow\__init__.py", line 101, in <module>
from tensorflow_core import *
File "C:\Users\Bob\Anaconda3\envs\tensor\lib\site-packages\tensorflow_core\__init__.py", line 40, in <module>
from tensorflow.python.tools import module_util as _module_util
File "C:\Users\Bob\Anaconda3\envs\tensor\lib\site-packages\tensorflow\__init__.py", line 50, in __getattr__
module = self._load()
File "C:\Users\Bob\Anaconda3\envs\tensor\lib\site-packages\tensorflow\__init__.py", line 44, in _load
module = _importlib.import_module(self.__name__)
File "C:\Users\Bob\Anaconda3\envs\tensor\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "C:\Users\Bob\Anaconda3\envs\tensor\lib\site-packages\tensorflow_core\python\__init__.py", line 49, in <module>
from tensorflow.python import pywrap_tensorflow
File "C:\Users\Bob\Anaconda3\envs\tensor\lib\site-packages\tensorflow_core\python\pywrap_tensorflow.py", line 74, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "C:\Users\Bob\Anaconda3\envs\tensor\lib\site-packages\tensorflow_core\python\pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\Users\Bob\Anaconda3\envs\tensor\lib\site-packages\tensorflow_core\python\pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\Users\Bob\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\Bob\Anaconda3\envs\tensor\lib\imp.py", line 243, in load_module
return load_dynamic(name, filename, file)
File "C:\Users\Bob\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.**
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.
Process finished with exit code 1
I have looked up these install errors with the link they provide, but all of the answers I tried either do not work or do not apply.
Thanks.
ImportError: DLL load failed issue is not with, how you have imported Keras and tensorflow ?
common solution for this is, you need to install/update Microsoft Visual C++ 2015-2019 Redistributable (x64) from here.
I have answered possible other reasons and compatible configurations (i.e Tensorflow, Python, etc. version details) for windows operating system in another Stackoverflow question here. Hope this will resolve your problem.

Tensorflow Object Detection Training Error

I am following tutorial for Tensorflow Object Detection
link
and getting the following command when i try this command
python train.py --logtostderr --train_dir=training/ --pipeline_config_path=training/faster_rcnn_inception_v2_pets.config
error:
FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
from ._conv import register_converters as _register_converters
Traceback (most recent call last):
File "train.py", line 49, in <module>
from object_detection import trainer
File "C:\Users\ASUS PC\Anaconda3\lib\site-packages\object_detection-0.1-py3.6.egg\object_detection\trainer.py", line 32, in <module>
from object_detection.utils import variables_helper
File "C:\Users\ASUS PC\Anaconda3\lib\site-packages\object_detection-0.1-py3.6.egg\object_detection\utils\variables_helper.py", line 23, in <module>
slim = tf.contrib.slim
File "C:\Users\ASUS PC\Anaconda3\lib\site-packages\tensorflow\python\util\lazy_loader.py", line 53, in __getattr__
module = self._load()
File "C:\Users\ASUS PC\Anaconda3\lib\site-packages\tensorflow\python\util\lazy_loader.py", line 42, in _load
module = importlib.import_module(self.__name__)
File "C:\Users\ASUS PC\Anaconda3\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "C:\Users\ASUS PC\Anaconda3\lib\site-packages\tensorflow\contrib\__init__.py", line 37, in <module>
from tensorflow.contrib import distributions
File "C:\Users\ASUS PC\Anaconda3\lib\site-packages\tensorflow\contrib\distributions\__init__.py", line 39, in <module>
from tensorflow.contrib.distributions.python.ops.estimator import *
File "C:\Users\ASUS PC\Anaconda3\lib\site-packages\tensorflow\contrib\distributions\python\ops\estimator.py", line 21, in <module>
from tensorflow.contrib.learn.python.learn.estimators.head import _compute_weighted_loss
File "C:\Users\ASUS PC\Anaconda3\lib\site-packages\tensorflow\contrib\learn\__init__.py", line 95, in <module>
from tensorflow.contrib.learn.python.learn import *
File "C:\Users\ASUS PC\Anaconda3\lib\site-packages\tensorflow\contrib\learn\python\__init__.py", line 28, in <module>
from tensorflow.contrib.learn.python.learn import *
File "C:\Users\ASUS PC\Anaconda3\lib\site-packages\tensorflow\contrib\learn\python\learn\__init__.py", line 40, in <module>
from tensorflow.contrib.learn.python.learn.experiment import Experiment
File "C:\Users\ASUS PC\Anaconda3\lib\site-packages\tensorflow\contrib\learn\python\learn\experiment.py", line 39, in <module>
from tensorflow.contrib.tpu.python.tpu import tpu_estimator
File "C:\Users\ASUS PC\Anaconda3\lib\site-packages\tensorflow\contrib\tpu\__init__.py", line 54, in <module>
from tensorflow.contrib.tpu.python import profiler
File "C:\Users\ASUS PC\Anaconda3\lib\site-packages\tensorflow\contrib\tpu\python\profiler\__init__.py", line 23, in <module>
from tensorflow.contrib.tpu.profiler.tpu_profiler_analysis_pb2 import *
File "C:\Users\ASUS PC\Anaconda3\lib\site-packages\tensorflow\contrib\tpu\profiler\tpu_profiler_analysis_pb2.py", line 16, in <module>
from tensorflow.contrib.tpu.profiler import tpu_profiler_pb2 as tensorflow_dot_contrib_dot_tpu_dot_profiler_dot_tpu__profiler__pb2
File "C:\Users\ASUS PC\Anaconda3\lib\site-packages\tensorflow\contrib\tpu\profiler\tpu_profiler_pb2.py", line 395, in <module>
_sym_db.RegisterServiceDescriptor(_TPUPROFILER)
AttributeError: 'SymbolDatabase' object has no attribute 'RegisterServiceDescriptor'
anybody faced this types of error? If so how can i solve the problem?
I is definitely related to something being off in your setup.py. Here is a thread that may help: https://github.com/GoogleCloudPlatform/cloudml-samples/issues/146. You may need to specify the version of the packages you are using as well.
link
In here the same issue is discussed and they found a solution. The problem is protobuf version i think.

keras and tensorflow are not running on gpu in centos 7

I have been trying to run a NN in keras using tf as backend in a centos 7 server but I got this error:
Using Theano backend.
WARNING (theano.configdefaults): install mkl with `conda install mkl-service`: No module named 'mkl'
Traceback (most recent call last):
File "/home/powerBuilding/anaconda3/envs/tensorgpu/lib/python3.5/configparser.py", line 1135, in _unify_values
sectiondict = self._sections[section]
KeyError: 'blas'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/powerBuilding/anaconda3/envs/tensorgpu/lib/python3.5/site-packages/theano/configparser.py", line 168, in fetch_val_for_key
return theano_cfg.get(section, option)
File "/home/powerBuilding/anaconda3/envs/tensorgpu/lib/python3.5/configparser.py", line 778, in get
d = self._unify_values(section, vars)
File "/home/powerBuilding/anaconda3/envs/tensorgpu/lib/python3.5/configparser.py", line 1138, in _unify_values
raise NoSectionError(section)
configparser.NoSectionError: No section: 'blas'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/powerBuilding/anaconda3/envs/tensorgpu/lib/python3.5/site-packages/theano/configparser.py", line 328, in __get__
delete_key=delete_key)
File "/home/powerBuilding/anaconda3/envs/tensorgpu/lib/python3.5/site-packages/theano/configparser.py", line 172, in fetch_val_for_key
raise KeyError(key)
KeyError: 'blas.ldflags'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/powerBuilding/anaconda3/envs/tensorgpu/lib/python3.5/site-packages/theano/configdefaults.py", line 1250, in check_mkl_openmp
import mkl
ImportError: No module named 'mkl'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "ffnnecodata2.py", line 1, in <module>
from keras.layers import Input, Dense, LSTM, Activation, Dropout, Reshape
File "/home/powerBuilding/anaconda3/envs/tensorgpu/lib/python3.5/site-packages/keras/__init__.py", line 3, in <module>
from . import utils
File "/home/powerBuilding/anaconda3/envs/tensorgpu/lib/python3.5/site-packages/keras/utils/__init__.py", line 6, in <module>
from . import conv_utils
File "/home/powerBuilding/anaconda3/envs/tensorgpu/lib/python3.5/site-packages/keras/utils/conv_utils.py", line 9, in <module>
from .. import backend as K
File "/home/powerBuilding/anaconda3/envs/tensorgpu/lib/python3.5/site-packages/keras/backend/__init__.py", line 81, in <module>
from .theano_backend import *
File "/home/powerBuilding/anaconda3/envs/tensorgpu/lib/python3.5/site-packages/keras/backend/theano_backend.py", line 7, in <module>
import theano
File "/home/powerBuilding/anaconda3/envs/tensorgpu/lib/python3.5/site-packages/theano/__init__.py", line 124, in <module>
from theano.scan_module import (scan, map, reduce, foldl, foldr, clone,
File "/home/powerBuilding/anaconda3/envs/tensorgpu/lib/python3.5/site-packages/theano/scan_module/__init__.py", line 41, in <module>
from theano.scan_module import scan_opt
File "/home/powerBuilding/anaconda3/envs/tensorgpu/lib/python3.5/site-packages/theano/scan_module/scan_opt.py", line 60, in <module>
from theano import tensor, scalar
File "/home/powerBuilding/anaconda3/envs/tensorgpu/lib/python3.5/site-packages/theano/tensor/__init__.py", line 17, in <module>
from theano.tensor import blas
File "/home/powerBuilding/anaconda3/envs/tensorgpu/lib/python3.5/site-packages/theano/tensor/blas.py", line 155, in <module>
from theano.tensor.blas_headers import blas_header_text
File "/home/powerBuilding/anaconda3/envs/tensorgpu/lib/python3.5/site-packages/theano/tensor/blas_headers.py", line 987, in <module>
if not config.blas.ldflags:
File "/home/powerBuilding/anaconda3/envs/tensorgpu/lib/python3.5/site-packages/theano/configparser.py", line 332, in __get__
val_str = self.default()
File "/home/powerBuilding/anaconda3/envs/tensorgpu/lib/python3.5/site-packages/theano/configdefaults.py", line 1447, in default_blas_ldflags
check_mkl_openmp()
File "/home/powerBuilding/anaconda3/envs/tensorgpu/lib/python3.5/site-packages/theano/configdefaults.py", line 1262, in check_mkl_openmp
""")
RuntimeError:
Could not import 'mkl'. Either install mkl-service with conda or set
MKL_THREADING_LAYER=GNU in your environment for MKL 2018.
If you have MKL 2017 install and are not in a conda environment you
can set the Theano flag blas.check_openmp to False. Be warned that if
you set this flag and don't set the appropriate environment or make
sure you have the right version you *will* get wrong results.
I'm using a conda environment and I tried to install mkl=2017 but it did not work.
I decided to translate my code to tensorflow and tried to run it again, but I got this message now:
Traceback (most recent call last):
File "tensorffnnecodata.py", line 17, in <module>
import tensorflow as tf
File "/home/powerBuilding/anaconda3/envs/tensorgpu/lib/python3.5/site-packages/tensorflow/__init
.py", line 24, in <module>
from tensorflow.python import * # pylint: disable=redefined-builtin
File "/home/powerBuilding/anaconda3/envs/tensorgpu/lib/python3.5/site-packages/tensorflow/python
_init__.py", line 49, in <module>
from tensorflow.python import pywrap_tensorflow
File "/home/powerBuilding/anaconda3/envs/tensorgpu/lib/python3.5/site-packages/tensorflow/python
ywrap_tensorflow.py", line 74, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "/home/powerBuilding/anaconda3/envs/tensorgpu/lib/python3.5/site-packages/tensorflow/python
ywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "/home/powerBuilding/anaconda3/envs/tensorgpu/lib/python3.5/site-packages/tensorflow/python
ywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "/home/powerBuilding/anaconda3/envs/tensorgpu/lib/python3.5/site-packages/tensorflow/python
ywrap_tensorflow_internal.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
File "/home/powerBuilding/anaconda3/envs/tensorgpu/lib/python3.5/imp.py", line 243, in load_modu
return load_dynamic(name, filename, file)
File "/home/powerBuilding/anaconda3/envs/tensorgpu/lib/python3.5/imp.py", line 343, in load_dyna
c
return _load(spec)
ImportError: libcudnn.so.7: cannot open shared object file: No such file or directory
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.
Do you know what is wrong with my installation?
The error suggests that you need to install cuDNN 7.0 (https://developer.nvidia.com/cudnn) for the version of Cuda you have installed from nVidia website and copy over the files to your Cuda installation folder. Prebuilt binaries of Tensorflow 1.7.0+ requires CUDA 9.0
ImportError: libcudnn.so.7: cannot open shared object file: No such file or directory

Resources