-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[python-nuitka] nuitka build of "wxhello.py" file fails when using msys2 "C:\msys64" on Windows 10 #22038
Comments
@podsvirov Would you like to look into this issue, please? |
@noeldiviney, I experience similar problems when exporting PySide projects too... But this is, in many ways, the problem of nuitka itself, and not the msys2 distribution. |
Thanks guys for your responses. I notice that Nuitka makes no mention of supporting MSYS64 so perhaps it would help if you indicate you have a similar issue. The Install command in the 'build from source' documentation needs to be updated from The binary that is built is named 'mingw-w64-x86_64-python-nuitka-2.4.8-2-any.pkg.tar.zst' Any plans to bring the default nuitka binary to version 2.4.8? Thank you for creating MSYS2. |
Hi @Biswa96 @podsvirov |
As an alternative, I suggest trying the pyinstaller package with similar functionality that we recently added. |
Description / Steps to reproduce the issue
Steps to demonstrate problem
1 Extract the attached "msys64setuo.zip" into "C:\nuitka\msys64setup"
We now have "c:\nuitka\msts64setup\msys64setup.sh" which is a Bash script to demonstrate the Nuitka problem
2 Download the MSYS2 installer by going to "https://www.msys2.org"
Scroll down to "Installation" and click on the "msys2-x86_64-20240727.exe" installer link.
Save installer to "C:\nuitka"
3 Install msys64 by double clicking "C:\nuitka\msys2-x86_64-20240727.exe"
Install to "c:/nuitka/msys64"
Click the "Finish" button to launch the msys64 terminal
4 Initialise msys64 by executing the following bash commands :-.
$ cd /c/nuitka/msys64setup/
$ ./msys64setup.sh
A restart of C:\nuitka\msys64\ucrt64.exe is required when the following output is displayed :-.
"To complete this update all MSYS2 processes including this terminal will be closed. Confirm to proceed [Y/n]"
To continue go to Step 5.
5. Restart msys64 terminal by executing "C:\nuitka\msys64\ucrt64.exe" and then entering the following bash commands.
$ cd /c/nuitka/msys64setup/
$ ./msys64setup.sh
"msys64setup.sh" will now perform the following :-.
A, Setup a MSYS2 working environment with toolchain, msys2-devel, mingw-w64-ucrt-x86_64-python3,
mingw-w64-ucrt-x86_64-python-pip, mingw-w64-ucrt-x86_64-wxPython, mingw-w64-ucrt-x86_64-python-nuitka.
B. Create a wxPython "Hello World" minimal GUI source program "wxhello.py".
C. Use the installed "C:\nuitka\msys64\ucrt64\bin\nuitka3.exe" to build "wxhello.py" as follows :-.
"nuitka3 --standalone wxhello.py --python-flag=-O" command.
D. Execute the successfully built wxhello.exe with command "./wxhello.dist/wxhello.exe"
wxhello.exe fails with "ImportError: LoadLibraryExW 'C:\nuitka\MSYS64
1\WXHELL1.DIS\wx_core.pyd'failed: The specified module could not be found.
Now note the use of a single "" in 'C:\nuitka\MSYS64
1\WXHELL1.DIS\wx_core.pyd'The following commands will correctly display that folder "wx" contents do exist :-
"ls -al C:\nuitka\MSYS64
1\WXHELL1.DIS\wx" and"ls -al C:/nuitka/MSYS64
1/WXHELL1.DIS/wx"msys64setup.zip
msys64setup-log.txt
Expected behavior
The wxPython wxhello.exe should display the GUI sucessfully
Actual behavior
wxhello.exe fails with the following error:-
Line 179 msys2.bash Executing ./wxhello.dist/wxhello.exe
Traceback (most recent call last):
File "C:\nuitka\MSYS64
1\WXHELL1.DIS\wxhello.py", line 7, inFile "C:\nuitka\MSYS64
1\WXHELL1.DIS\wx/init.py", line 17, inFile "C:\nuitka\MSYS64
1\WXHELL1.DIS\wx/core.py", line 12, inImportError: LoadLibraryExW 'C:\nuitka\MSYS64
1\WXHELL1.DIS\wx_core.pyd' failed: The specified module could not be found.Verification
Windows Version
MINGW64_NT-10.0-19045
MINGW environments affected
Are you willing to submit a PR?
I would like to
The text was updated successfully, but these errors were encountered: