andlvovsky
andlvovsky

Reputation: 104

Missing dll files using PyInstaller on Windows

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:

Upvotes: 4

Views: 3911

Answers (2)

andlvovsky
andlvovsky

Reputation: 104

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.

Upvotes: 1

Wesley Atwood
Wesley Atwood

Reputation: 54

It is explained in the github issue

  1. Add C:\Users(username)\AppData\Roaming\Python\Python37\Scripts to user path: open 'Run' app -> Open 'sysdm.cpl' -> 'Advanced' -> 'Environment Variables' -> Edit 'path' in User Variable

  2. Copy the .py file (the one holding your python code) to C:\Users(username)\AppData\Roaming\Python\Python37\Scripts

  3. Run python -m pip install pyinstaller in terminal to install pyinstaller

  4. Run .\pyinstaller -w -F (your file name).py in your terminal to convert python file to .exe

Now the .exe tool should already be available in C:\Users(username)\AppData\Roaming\Python\Python37\Scripts\dist folder.

Upvotes: 0

Related Questions