-
-
Couldn't load subscription status.
- Fork 1.3k
Closed
Labels
Description
setuptools version
setuptools==64.0.0
Python version
Python 3.10.6
OS
Ubuntu jammy
Additional environment information
No response
Description
After creating a simple project and installing it as editable with pip install -e, I'm unable to import modules from the package.
Expected behavior
We should be able to import a package installed as editable.
How to Reproduce
1. Create this simple project structure
pyproject.toml
[build-system]
requires = [
"setuptools==64.0.0",
"wheel",
]
build-backend = "setuptools.build_meta"
[project]
name = "foo"
version = "1.0.0"
[tool.setuptools]
packages.find.include = ["foo.*"]
setup.py
from setuptools import setup
setup()
foo/__init__.py
__version__ = "1.0.0"
2. Create and activate a venv:
python -mvenv venv
. venv/bin/activate
3. Install the project as editable:
python install -e .
Change to another directory and try to import the package:
python -c "import foo"
Output
Traceback (most recent call last):
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'foo'