Cannot locate suitable C compiler VS2019
See original GitHub issueHello, this is regarding nuitka version 0.6.7 obtained via pip on Windows Server 2019.
The precise error can be found in this pipeline output:
scons: warning: MSVC_USE_SCRIPT set to False, assuming environment set correctly.
File "C:\HOSTED~1\windows\Python\3794D4~1.7\x64\lib\SITE-P~1\nuitka\build\SINGLE~1.SCO", line 521, in createEnvironment
Error, cannot locate suitable C compiler. You have the following options:
a) If a suitable Visual Studio version is installed, it will not be located
automatically, unless you install pywin32 for the Python installation
below "C:\hostedtoolcache\windows\Python\3.7.7\x64".
b) To make it find Visual Studio without registry execute from Start Menu
the 'Visual Studio Command Prompt' or "vcvarsall.bat". That will add
Visual Studio to the "PATH". And it then will be detected.
c) Install MinGW64 to "C:\MinGW64" or "\MinGW", where then it is automatically
detected or add it to PATH before executing Nuitka. But be sure to pick the
proper variant (32/64 bits, your Python arch is 'x86_64'), or else cryptic errors
will be shown.
The build machine has Visual Studio 2019 Enterprise installed, and as part of suggestion b) provided by the error, I run this command beforehand (but still encounter this error):
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat
Also tried pip install pywin32
beforehand to address suggestion a), but this also leads to same error.
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (3 by maintainers)
Top Results From Across the Web
CMake does not find Visual C++ compiler - Stack Overflow
I went searching for cl.exe in the Visual Studio folder, C:\Program Files\Microsoft Visual Studio 14.0 , and could not find it. How do...
Read more >Intel C++ Compiler 19.1 can't work after update visual ...
Intel C++ Compiler 19.1 can't work after update visual studio2019 v16.8.0 ... FindEntry(TKey key) 1>C:\Program Files (x86)\Microsoft Visual ...
Read more >Install C and C++ support in Visual Studio - Microsoft Learn
Learn how to install Visual Studio with support for Microsoft C/C++ and related workloads.
Read more >Compiling amalgamation with Visual Studio 2019 - SQLite Forum
I'm guessing that your VS2019 install is defective. Any C compiler that cannot find "stdlib.h" has issues. (8) By Bill ...
Read more >Microsoft Visual Studio 2022 set up as default C and C++ ...
Visual C++ is already installed in my desktop but how can I integrate it to MATLAB in order to be the compiler in...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This worked for me, one month ago (mid April 2020) using nuitka 0.6.7:
Install Microsoft - Visual Studio Build Tools 2019, default options should be enough. I changed the install location. [image: image.png]
Find vcvarsall.bat in your installation, I found it in F:\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build
Choose your build target (x86 or x64) to match the Python version/platform of your project.
Open a command environment there and execute vcvarsall.bat, with the proper arguments for your target, to set the environment variables.
In the same command window navigate to the location of your Python project.
Compile with Nuitka.
If that works, add the call to vcvarsall.bat to your build scripts… or the build system complexity layer of your choice 😉
Cheers.
On Sun, May 10, 2020 at 7:27 PM Daniel Nowak notifications@github.com wrote:
@lowlyocean I am switching to https, just did so for factory branch. I hated it for writing if I recall correctly, because it needs more than a simply ssh key, but I will sort that out I guess