How to solve tensor flow cpu dll not found error

风流意气都作罢 提交于 2021-02-01 05:08:59

问题


I have install tensorflow v2.1.0 with python version 3.6.6 and pip version 20.0.2. When i try to import tensorflow i got below error.

C:\Users\Dexter>python
Python 3.6.6 (v3.6.6:4cf1f54eb7, Jun 27 2018, 03:37:03) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow
Traceback (most recent call last):
  File "C:\Users\Dexter\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow_core\python\pywrap_tensorflow.py", line 58, in <module>
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "C:\Users\Dexter\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow_core\python\pywrap_tensorflow_internal.py", line 28, in <module>
    _pywrap_tensorflow_internal = swig_import_helper()
  File "C:\Users\Dexter\AppData\Local\Programs\Python\Python36\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\Dexter\AppData\Local\Programs\Python\Python36\lib\imp.py", line 243, in load_module
    return load_dynamic(name, filename, file)
  File "C:\Users\Dexter\AppData\Local\Programs\Python\Python36\lib\imp.py", line 343, in load_dynamic
    return _load(spec)
ImportError: DLL load failed: The specified module could not be found.

When i searched on google i always get tensorflow-gpu solution i don't have any graphic card in my system. below is info of my display driver. Please help me with this i stuck in this.

I have c++ Redistributable for Visual Studio 2017


回答1:


As per installation instructions for Windows, Tensorflow 2.1.0 requires Microsoft Visual C++ Redistributable for Visual Studio 2015, 2017, and 2019 - which is what you are (partially) missing. Moreover, starting with the TensorFlow 2.1.0 version, the msvcp140_1.dll file is required from this package (which may not be provided from older redistributable packages).

That's why you're getting the error. Install the missing packages following these instructions. In essence, grab the 2015, 2017 and 2019 Redistributable, all in single package, available from here.




回答2:


Try to install Anaconda make a virtual env. and it will install automatically all the depedencies of the libraries that you want!



来源:https://stackoverflow.com/questions/60543207/how-to-solve-tensor-flow-cpu-dll-not-found-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!