Search code examples
pythonpyinstallermsys2

How to install python-dev on MSYS2?


Posts I've viewed: How to Install Python Development Tools on MSYS2

I'm trying to run pyinstaller in msys2, but I'm getting the following error:

OSError: Python library not found: 
    python38.dll, libpython3.8.dll, libpython38.dll, libpython3.8m.dll, libpython38m.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)

Here's what I've tried installing in MSYS2 using pacman:

  • mingw-w64-x86_64-python
  • libgpgme-python
  • mingw-w64-i686-python3
  • base-devel

Unfortunately, I get the same error every time. I've also tried setting my path variable to every place I could think of that might have these libraries, and even one spot that I know has libpython3.8.dll but it was no help.

Thanks in advance!


Solution

  • It looks like
    pip install python-dev-tools
    was what I was looking for.