After I run:
pyupdater build -F --app-version 0.0.1 app.py
I get an error:
[INFO] PyUpdater 3.1.1
[INFO] Compiling...
Python library not found: libpython3.7.dll, libpython37m.dll, libpython3.7m.dll, python37.dll, libpython37.dll
This would mean your Python installation doesn't come with proper library files.
This usually happens by missing development package, or unsuitable build parameters of Python installation.
* On Debian/Ubuntu, you would need to install Python development packages
* apt-get install python3-dev
* apt-get install python-dev
* If you're building Python by yourself, please rebuild your Python with `--enable-shared` (or, `--enable-framework` on Darwin)
Environment:
- Windows 10
- Python 3.7.9
- PyUpdater 3.1.1
- Pyinstaller 4.1
2
Answers
I've removed all Python versions and installed the one from the official site and it's working now. It seems like Pyinstaller doesn't work correctly with Python installed from Microsoft Store.
It is explained in the github issue
Add
C:Users(username)AppDataRoamingPythonPython37Scripts
to user path:open
'Run' app -> Open 'sysdm.cpl' -> 'Advanced' -> 'Environment Variables' -> Edit 'path'
in User VariableCopy the
.py
file (the one holding your python code) toC:Users(username)AppDataRoamingPythonPython37Scripts
Run
python -m pip install pyinstaller
in terminal to install pyinstallerRun
.pyinstaller -w -F (your file name).py
in your terminal to convert python file to .exeNow the .exe tool should already be available in
C:Users(username)AppDataRoamingPythonPython37Scriptsdist
folder.