Fontanka16
Fontanka16

Reputation: 1323

Python application packaged for Windows 11 using pyside6-deploy complains about numpy installation

I have spent the day working on a Qt POC application based on the Pandas simple example and trying to package it using pyside6-deploy. The Linux parts works fine on WSL, and once I had installed gcc.exe and the rest, running and packaging everything on Windows 11 also seemed to work out well.

However, when I try to run my .exe file on Windows I get the following error:

ImportError: Unable to import required dependencies:
numpy: Error importing numpy: you should not try to import numpy from
        its source directory; please exit the numpy source tree, and relaunch
        your python interpreter from there.

I have done some searching, but the suggestions I have found so far wants me to build numpy from source. This feels somewhat backwards.

I have not used any requirements.txt nor pyproject.toml files, since the only dependency is Pandas

Python version on windows is 3.10, since later releases did not play nicely with Nuitka

What am I doing wrong?

Edit: Running the other, more simple, examples without any non PyQT-package dependencies works just fine.

Upvotes: 0

Views: 801

Answers (1)

Akshat Mishra
Akshat Mishra

Reputation: 11

You can use Auto_py_to_exe to package it for windows 11.

Working Gif

pip install auto-py-to-exe
auto-py-to-exe [-nc] [-c [CONFIG]] [-o [PATH]] [filename]

For further you can go to its documentation: Documentation

Upvotes: 1

Related Questions