This may sound like dumb but after working in python for so many years, I want to understand why numpy gets installed while tensorflow asks for Microsoft VC++ to get installed in Windows. Common knowledge says both are written in C++. Then why former package is getting installed without any problem,while the later asks for VC++?
Asked
Active
Viewed 270 times
0
-
Most of us don't build `numpy` from source; we install versions with precompiled binaries (via `ancadonda, pip, etc). The respective install documentations should explain the requirements. – hpaulj Jun 09 '21 at 18:09
1 Answers
0
The VC++ requirement exists since version 2.1. The release notes of the version 2.1 states:
Windows users: Officially-released tensorflow Pip packages are now built with Visual Studio 2019 version 16.4 in order to take advantage of the new /d2ReducedOptimizeHugeFunctions compiler flag. To use these new packages, you must install "Microsoft Visual C++ Redistributable for Visual Studio 2015, 2017 and 2019", available from Microsoft's website here.
- This does not change the minimum required version for building TensorFlow from source on Windows, but builds enabling EIGEN_STRONG_INLINE can take over 48 hours to compile without this flag. Refer to configure.py for more information about EIGEN_STRONG_INLINE and /d2ReducedOptimizeHugeFunctions.
- If either of the required DLLs, msvcp140.dll (old) or msvcp140_1.dll (new), are missing on your machine, import tensorflow will print a warning message.
This change makes the Windows tensorflow package depends on some C++ API that are not available by default on a Windows machine. You can read more about it on that question: Why does my application require Visual C++ Redistributable package

Lescurel
- 10,749
- 16
- 39