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
412 views
in Technique[技术] by (71.8m points)

python 3.x - Tensorflow - ImportError: Could not find 'msvcp140.dll'

I am just a beginner to a tensorflow and trying to install TensorFlow with CPU support only.

Initially, I downloaded and installed Python 3.5.2 version from https://www.python.org/downloads/release/python-352/

After successful installation, I ran the command pip3 install --upgrade tensorflow which installed tensorflow-1.8.0.

To test installation i just ran following commands:

> python

> import tensorflow as tf

But this gave me an error:

ImportError: Could not find 'msvcp140.dll'. TensorFlow requires that this DLL be installed in a directory that is named in your %PATH% environment variable. You may install this DLL by downloading Visual C++ 2015 Redistributable Update 3 from this URL: https://www.microsoft.com/en-us/download/details.aspx?id=53587

I searched for this issue and found link to an issue https://github.com/tensorflow/tensorflow/issues/17393.

According to above i tried running command

pip install tensorflow==1.5

But, this didn't solved my problem.

I even tried downloading msvcp140.dll and manually coping it under C:WindowsSysWOW64 folder and reinstalling python and tensorflow.

How do I fix this problem.

Thanks in advance.

See Question&Answers more detail:os

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

1 Reply

0 votes
by (71.8m points)

I copied msvcp140.dll to path C:UsersPCNameAppDataLocalProgramsPythonPython35 and it worked for me.

I also switched back to tensorflow 1.8 from 1.5.


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

...