Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't pip install Tensorflow 'msvcp140_1.dll' missing

I am currently trying to pip install tensorflow, which works but after I install it, and then import it into my python module via import tensorflow as tf I get following error message:

ImportError: Could not find the DLL(s) 'msvcp140_1.dll'. TensorFlow requires that
these DLLs be installed in a directory that is named in your %PATH% environment
variable. You may install these DLLs by downloading "Microsoft C++ Redistributable
for Visual Studio 2015, 2017 and 2019" for your platform from this URL: 
https://support.microsoft.com/help/2977003/the-latest-supported-visual-c-downloads

I installed the msvcp140_1.dll and put it into C:\Users\User\AppData\Local\Programs\Python\Python37 which is contained in my path environment variable.

As you can see I am using Python 3.7 as 3.8 is not supported by tensorflow. Any ideas how to fix this?

like image 620
Mark Jacobsen Avatar asked Feb 10 '20 19:02

Mark Jacobsen


2 Answers

You can find msvcp140.dll in your %windows%/System32 folder, once you installed VC++ DIST for VS 2015, for msvcp140_1.dll you need to goto this page

https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads

and in the section :Visual Studio 2015, 2017 and 2019, pick the correct package with the arch of your PC.

like image 199
KingQQ Avatar answered Nov 18 '22 20:11

KingQQ


Just click this link https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads Then install

x64: vc_redist.x64.exe

and restart your pc.

like image 7
Partha Kumar Bagchi Avatar answered Nov 18 '22 21:11

Partha Kumar Bagchi