1

i have a package (lets call it test-package) that has a pyproject.toml file but also has setup.py

if i install it locally with python -m pip install -e . --no-use-pep517 with pip>=20.1.3, the package is installed.python -c "import inspect, test_package; print(inspect.getfile(test_package))" works and points to local file

if i python -m pip install -e . in a virtual env, python -c "import inspect, test_package; print(inspect.getfile(test_package))" works

if i python -m pip install --no-build-isolation -e . python -c "import inspect, test_package; print(inspect.getfile(test_package))" works

but python -m pip install -e . is successful, yet python -c "import inspect, test_package; print(inspect.getfile(test_package))" results in an error ModuleNotFoundError: No module named 'test_package'.

I tried reading pep517 and pep518. i still don't understand how to reason about above behavior. i was wondering if someone can please explain to me

user1427381
  • 11
  • 1
  • 1
  • 1
    Which versions of setuptools and pip? What are the contents of `pyproject.toml` and `setup.py`? – sinoroc Aug 14 '22 at 00:37

0 Answers0