Skip to content

PyInstaller fails with editable pyproject.toml installs #7524

@mhils

Description

@mhils

After transitioning from setup.py to pyproject.toml, our PyInstaller builds started to fail with the following traceback:

$ ./mitmproxy
Traceback (most recent call last):
  File "mitmproxy", line 1, in <module>
ModuleNotFoundError: No module named 'mitmproxy'
[2041] Failed to execute script 'mitmproxy' due to unhandled exception!

I discovered I can fix this by using pip install . instead of pip install -e . for my package. It seems like PyInstaller has troubles detecting/resolving editable pyproject.toml installs.

I've created a minimal reproducer here: https://github.com/mhils/pyinstaller-pyproject-editable

Context information (for bug reports)

  • Output of pyinstaller --version: 5.9.0 and 1c6aa74
  • Version of Python: 3.11
  • Platform: Linux and Windows
  • How you installed Python: deadsnakes / python.org/downloads.

refs mitmproxy/mitmproxy#6025

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions