Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
262 views
in Technique[技术] by (71.8m points)

python - How to solve tensor flow cpu dll not found error

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:UsersDexter>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:UsersDexterAppDataLocalProgramsPythonPython36libsite-packagesensorflow_corepythonpywrap_tensorflow.py", line 58, in <module>
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "C:UsersDexterAppDataLocalProgramsPythonPython36libsite-packagesensorflow_corepythonpywrap_tensorflow_internal.py", line 28, in <module>
    _pywrap_tensorflow_internal = swig_import_helper()
  File "C:UsersDexterAppDataLocalProgramsPythonPython36libsite-packagesensorflow_corepythonpywrap_tensorflow_internal.py", line 24, in swig_import_helper
    _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
  File "C:UsersDexterAppDataLocalProgramsPythonPython36libimp.py", line 243, in load_module
    return load_dynamic(name, filename, file)
  File "C:UsersDexterAppDataLocalProgramsPythonPython36libimp.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. enter image description here

I have c++ Redistributable for Visual Studio 2017

enter image description here

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...