failed to load the native tensorflow runtime. reason : image not found. what am i doing wrong?

  • Last Update :
  • Techknowledgy :

Thank you for all your suggestions. I tried installing the CPU only version of TensorFlow using

{
   pip install--upgrade https: //storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.0.1-py2-none-any.whl
}

which fixed the problem. The interesting thing were the messages stating that I was not using the GPU.

{
   Python 2.7 .10(
      default, Jul 13 2015, 12: 05: 58)[GCC 4.2 .1 Compatible Apple LLVM 6.1 .0(clang - 602.0 .53)] on darwin
   Type "help", "copyright", "credits"
   or "license"
   for more information. >>>
      import tensorflow as tf >>>
      hello = tf.constant('Hello, TensorFlow!') >>>
      sess = tf.Session()
   W tensorflow / core / platform / cpu_feature_guard.cc: 45] The TensorFlow library wasn 't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations.
W tensorflow / core / platform / cpu_feature_guard.cc: 45] The TensorFlow library wasn 't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.
W tensorflow / core / platform / cpu_feature_guard.cc: 45] The TensorFlow library wasn 't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations. >>>
   print(sess.run(hello))
Hello, TensorFlow!
}
1._
pip install--upgrade
https: //storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.0.1-py2-
   none - any.whl

But it tends to be:

File "/Users/yuanyinjiao/anaconda/lib/python2.7/site-
packages / pip / _vendor / pkg_resources / __init__.py ", line 1823, in _has
return zip_path in self.zipinfo or zip_path in self._index()
File "/Users/yuanyinjiao/anaconda/lib/python2.7/site-
packages / pip / _vendor / pkg_resources / __init__.py ", line 1703, in zipinfo
return self._zip_manifests.load(self.loader.archive)
File "/Users/yuanyinjiao/anaconda/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 1643, in load
mtime = os.stat(path).st_mtime

OSError: [Errno 2] No such file or directory: '/Users/yuanyinjiao/anaconda/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg'

So I download setuptools-0.6c11-py2.7.egg from https://pypi.python.org/pypi/setuptools/0.6c11 and it finally works.

  Found existing installation: tensorflow 1.0 .1
  Uninstalling tensorflow - 1.0 .1:
     Successfully uninstalled tensorflow - 1.0 .1
  Successfully installed tensorflow - 1.0 .1
  yuanyinjiaodeMacBook - Pro: downloads yuanyinjiao$ python
  Python 2.7 .13 | Anaconda 4.4 .0(x86_64) | (
     default, Dec 20 2016, 23: 05: 08)[GCC 4.2 .1 Compatible Apple LLVM 6.0(clang - 600.0 .57)] on darwin
  Type "help", "copyright", "credits"
  or "license"
  for more information.
  Anaconda is brought to you by Continuum Analytics.
  Please check out: http: //continuum.io/thanks and https://anaconda.org
     >>>
     import tensorflow >>>
     import tensorflow

Suggestion : 2

 February 01, 2022     python, tensorflow, virtualenv   

{

(tensorflow) m:src sm$ python
Python 2.7.10 (default, Jul 13 2015, 12:05:58)
[GCC 4.2.1 Compatible Apple LLVM 6.1.0 (clang-602.0.53)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
      File "/Users/smahesh/src/tensorflow/lib/python2.7/site-packages/tensorflow/__init__.py", line 24, in <module>
         from tensorflow.python import *
         File "/Users/smahesh/src/tensorflow/lib/python2.7/site-packages/tensorflow/python/__init__.py", line 72, in <module>
            raise ImportError(msg)
            ImportError: Traceback (most recent call last):
            File "/Users/smahesh/src/tensorflow/lib/python2.7/site-packages/tensorflow/python/__init__.py", line 61, in <module>
               from tensorflow.python import pywrap_tensorflow
               File "/Users/smahesh/src/tensorflow/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 28, in <module>
                  _pywrap_tensorflow = swig_import_helper()
                  File "/Users/smahesh/src/tensorflow/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 24, in swig_import_helper
                  _mod = imp.load_module('_pywrap_tensorflow', fp, pathname, description)
                  ImportError: dlopen(/Users/smahesh/src/tensorflow/lib/python2.7/site-packages/tensorflow/python/_pywrap_tensorflow.so, 10): Library not loaded: @rpath/libcudart.8.0.dylib
                  Referenced from: /Users/smahesh/src/tensorflow/lib/python2.7/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

Thank you for all your suggestions. I tried installing the CPU only version of TensorFlow using

{
   pip install--upgrade https: //storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.0.1-py2-none-any.whl
}

which fixed the problem. The interesting thing were the messages stating that I was not using the GPU.

{
   Python 2.7 .10(
      default, Jul 13 2015, 12: 05: 58)[GCC 4.2 .1 Compatible Apple LLVM 6.1 .0(clang - 602.0 .53)] on darwin
   Type "help", "copyright", "credits"
   or "license"
   for more information. >>>
      import tensorflow as tf >>>
      hello = tf.constant('Hello, TensorFlow!') >>>
      sess = tf.Session()
   W tensorflow / core / platform / cpu_feature_guard.cc: 45] The TensorFlow library wasn 't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations.
W tensorflow / core / platform / cpu_feature_guard.cc: 45] The TensorFlow library wasn 't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.
W tensorflow / core / platform / cpu_feature_guard.cc: 45] The TensorFlow library wasn 't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations. >>>
   print(sess.run(hello))
Hello, TensorFlow!
}

Suggestion : 3

I'm new at python (version of python 3.7.7) and I'm trying to run a finished project, I imported everything but tensorflow is not working the error is shown down below:,It happened to me as well. I tried multiple ways to install Tensorflow in my own system. But it shows me a similar type of error. It most probably to the environment-related. You can give it one more try. Just uninstall python and TensorFlow and related packages. And try with another version., tensorflow is installed but theres an error while... ,100265/tensorflow-is-installed-but-theres-an-error-while-importing

I'm new at python (version of python 3.7.7) and I'm trying to run a finished project, I imported everything but tensorflow is not working the error is shown down below:

Traceback (most recent call last): File
"C:\Users\User\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\pywrap_tensorflow.py",
line 64, in <module>
   from tensorflow.python._pywrap_tensorflow_internal import * ImportError: DLL load failed: A dynamic link library (DLL)
   initialization routine failed. During handling of the above exception,
   another exception occurred: Traceback (most recent call last): File
   "C:/Users/User/Desktop/adsp/train.py", line 1, in <module>
      import tensorflow as tf File "C:\Users\User\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\__init__.py",
      line 41, in <module>
         from tensorflow.python.tools import module_util as _module_util File
         "C:\Users\User\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\__init__.py",
         line 39, in <module>
            from tensorflow.python import pywrap_tensorflow as _pywrap_tensorflow File "C:\Users\User\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\pywrap_tensorflow.py",
            line 83, in <module>
               raise ImportError(msg) ImportError: Traceback (most recent call last): File
               "C:\Users\User\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\pywrap_tensorflow.py",
               line 64, in <module>
                  from tensorflow.python._pywrap_tensorflow_internal import * ImportError: DLL load failed: A dynamic link library (DLL)
                  initialization routine failed. 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.
  • Create one environment and install latest version of python.

$ conda create - n tensorflow pip python = 3.6
  • Use tensorflow environment.

$ activate tensorflow
  • Install tensorflow.

$ pip install--ignore - installed--upgrade tensorflow == 1.9
  • Uninstall the current version of Tensorflow.

$ pip uninstall tensorflow
  • Reinstall tensorflow 1.15
$ pip install tensorflow == 1.15

I tried the following commands it didn't work :

pip uninstall tensorflow
pip uninstall tensorflow 
pip install tensorflow == 1.15

Suggestion : 4

usually indicates that certain Python packages are not installed. Please run pip install or pip3 install depending on your Python binary version to install those packages.,after running pip install mediapipe usually indicates that there is no qualified MediaPipe Python for your system. Please note that MediaPipe Python PyPI officially supports the 64-bit version of Python 3.7 to 3.10 on the following OS:,If the OS is currently supported and you still see this error, please make sure that both the Python and pip binary are for Python 3.7 to 3.10. Otherwise, please consider building the MediaPipe Python package locally by following the instructions here.,usually indicates that the local Windows system is missing Visual C++ redistributable packages and/or Visual C++ runtime DLLs. This can be solved by either installing the official vc_redist.x64.exe or installing the “msvc-runtime” Python package by running

ERROR: An error occurred during the fetch of repository 'local_execution_config_python':
   Traceback(most recent call last):
   File "/sandbox_path/external/org_tensorflow/third_party/py/python_configure.bzl", line 208
get_python_bin(repository_ctx)
   ...
   Repository command failed
bazel build - c opt\
   --define MEDIAPIPE_DISABLE_GPU = 1\
   --action_env PYTHON_BIN_PATH = $(which python3)\
mediapipe / examples / desktop / hello_world
ImportError: No module named numpy
Is numpy installed ?
ERROR: An error occurred during the fetch of repository 'org_tensorflow':
   java.io.IOException: Error downloading[https: //mirror.bazel.build/github.com/tensorflow/tensorflow/archive/77e9ffb9b2bfb1a4f7056e62d84039626923e328.tar.gz, https://github.com/tensorflow/tensorflow/archive/77e9ffb9b2bfb1a4f7056e62d84039626923e328.tar.gz] to /sandbox_path/external/org_tensorflow/77e9ffb9b2bfb1a4f7056e62d84039626923e328.tar.gz: Tried to reconnect at offset 9,944,151 but server didn't support it

      or

      WARNING: Download from https: //storage.googleapis.com/mirror.tensorflow.org/github.com/bazelbuild/rules_swift/releases/download/0.12.1/rules_swift.0.12.1.tar.gz failed: class java.net.ConnectException Connection timed out (Connection timed out)
error: undefined reference to 'cv::String::deallocate()'
error: undefined reference to 'cv::String::allocate(unsigned long)'
error: undefined reference to 'cv::VideoCapture::VideoCapture(cv::String const&)'
   ...
   error: undefined reference to 'cv::putText(cv::InputOutputArray const&, cv::String const&, cv::Point, int, double, cv::Scalar, int, int, bool)'
ERROR: Could not find a version that satisfies the requirement mediapipe
ERROR: No matching distribution found
for mediapipe

Suggestion : 5

[Install] Failed to load the native TensorFlow runtime,Failed to load the native TensorFlow runtime,Failed to load the native TensorFlow runtime in Mac OSX,I am building a small application to classify images based on certain facial features. I have started a tutorial (https://www.tensorflow.org/hub/tutorials/image_retraining) to retrain a new model on my own images.

Which Tensorflow version do you use? I recommend you to upgrade your Tensorflow.

pip install--upgrade--ignore - installed tensorflow - gpu == 1.5