MINGW-packages icon indicating copy to clipboard operation
MINGW-packages copied to clipboard

nuitka fails to find Python headers

Open ghost opened this issue 5 years ago • 13 comments

I'm trying to use nuitka with mingw-w64-i686-python3 under msys2 but it throws up errors asking for .h files, is there a python3-dev package anywhere I can use? I have it working on a normal python setup so my compiler is setup correctly (visual studio and mingw-64.)

ghost avatar Jan 15 '19 22:01 ghost

Just to confirm it is getting as far as the compiler before showing the error needing .h files.

ghost avatar Jan 15 '19 22:01 ghost

@Azza-NZ what package you use MSYS-python or MINGW-python? Also what GCC used MINGW-GCC or MSYS-GCC?

You need MINGW GCC for MINGW PYTHON3

Alexpux avatar Jan 16 '19 08:01 Alexpux

I somehow installed the needed dev files, but it simply asked for more source files "crypt.h" , this page says it's known it's missing from mingw.

https://www.gnu.org/software/gnulib/manual/html_node/crypt_002eh.html

I was doing this because I wanted to use Python 3.7.2 with PyGobject and Nuitka, was anyone succesfully done that?

ghost avatar Jan 19 '19 05:01 ghost

I likely had this problem too. A package I tried to compile picked up the MSYS Python.h instead of the MinGW one. For me it was enough to remove the python package. You need to install mingw-w64-x86_64-python3 (depending on whether you need 32/64 bits and Python 2 or 3)

EchterAgo avatar Apr 26 '19 04:04 EchterAgo

I only get this, so likely nuitka is broken..

$ CC=gcc nuitka3 a.py

scons: warning: MSVC_USE_SCRIPT set to False, assuming environment set correctly.
File "C:/msys64/mingw32/lib/python3.7/site-packages/nuitka/build/inline_copy/lib/scons-3.0.4\SCons\Script\Main.py", line 609, in _scons_internal_warning
Error, no 'Python.h' development headers can be found at 'C:/msys64/mingw32/include', dependency not satisfied

lazka avatar May 05 '19 07:05 lazka

Yes, Nuitka has a few problems with this setup. I've got it working, under wine, and will post updates/patches referencing https://github.com/Nuitka/Nuitka/issues/43

jayvdb avatar Sep 30 '19 19:09 jayvdb

Python 3.8 is in RC1 now.

Will it be replacing Python 3.7 when it is stable and all mingw Python packages build & pass smoke tests on it?

Or will it be a separate package which can be a bit experimental?

This is regarding Nuitka support of static standalone, which I would ideally like to solve at the same time https://github.com/Nuitka/Nuitka/issues/95

It might be easier to solve in Python 3.8 - still investigating that.

jayvdb avatar Oct 04 '19 06:10 jayvdb

It'll replace 3.7, but it might take some time after the release to rebase our changes. 3.8 changed they way Python loads binary extensions on Windows, so that could result in additional work.

lazka avatar Oct 04 '19 12:10 lazka

Still no solution to this?

andrewgohlk avatar Feb 24 '20 07:02 andrewgohlk

I still get

CC=gcc nuitka3 g.py
Error, no 'Python.h' development headers can be found at 'C:/msys64/mingw64/include', dependency not satisfied!

so likely nothing has changed.

lazka avatar Feb 24 '20 08:02 lazka

OS Ubuntu 18.40 Python 3.8.0 nuitka 0.6.9.4

Also:

Scons: Compiler used /usr/bin/gcc
Error, no 'Python.h' development headers can be found at 'C:/msys64/mingw64/include', dependency not satisfied!

kuznetsov-m avatar Oct 20 '20 22:10 kuznetsov-m

Not sure what you guys are doing, checkout Nuitka/Nuitka#872 where I found it to be working out of the box with the correct packages installed, these being python-devel python gcc. Just don't use MinGW if you are not on Win32.

kayhayen avatar Oct 29 '20 12:10 kayhayen

@podsvirov Was it fixed?

MehdiChinoune avatar Aug 28 '22 06:08 MehdiChinoune