Skip to content

Troubleshooting Pyxelpackager

JP Etcheber edited this page Mar 26, 2020 · 6 revisions

These are just some notes on additional undocumented steps that I need to take to use Pyxelpackager on each platform. My main development platform is xubuntu 18.04.4, but each binary has to be compiled on their own platform.

Linux (xubuntu 18.04.4 LTS)

When running pyxelpackager on the game,

$ pyxelpackager game.py                         
pyinstaller [pyinstaller options redacted]
Unable to find "~/.virtualenvs/dungeon-dos/include/python3.7m/pyconfig.h" when 
adding binary and data files.
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)

This was because I was using virtualenvwrapper and my virtualenvironment did not include the include files from Python 3.7

Solution

Create an include directory in the virtualenv if none exists and copy in the /usr/include/python3.7m/ directory. The location of the missing pyconfig.h may differ depending on your system (even variations of Ubuntu may vary in this).

mkdir ~/.virtualenvs/dungeon-dos/include/
cp -r /usr/include/python3.7m/ ~/.virtualenvs/dungeon-dos/include/

MacOS Catalina

When running pyxelpackager, I had to use a development version of Pyinstaller. This may be fixed in the future, but the version I'm running in my python virtualenv is PyInstaller==4.0.dev0+3e6f7dc709.

Solution

pip uninstall pyinstaller
pip install https://github.com/pyinstaller/pyinstaller/archive/develop.zip

Windows 10 Pro (1903)

Windows was pretty easy to build for, however, there is one additional package to install. I'm not including this in the requirements, since it is specific for building on one platform only and not used by others.

Solution

pip install pywin32

Clone this wiki locally