pipenv: ModuleNotFoundError when running installed packages
I am seeing this issue with lots of packages that have a command-line entry point (at least pytest
and honcho
):
$ pipenv --version
pipenv, version 3.2.0
$ pipenv install honcho
Installing honcho...
Collecting honcho
Using cached honcho-0.7.1-py2.py3-none-any.whl
Installing collected packages: honcho
Successfully installed honcho-0.7.1
Adding honcho to Pipfile's [packages]...
$ pipenv run honcho
Traceback (most recent call last):
File "<root>/.venv/bin/honcho", line 7, in <module>
from honcho.command import main
ModuleNotFoundError: No module named 'honcho'
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 19 (15 by maintainers)
Commits related to this issue
- Prevent invalid shebangs with Homebrew Python Fixes https://github.com/kennethreitz/pipenv/issues/98 — committed to jacebrowning/pipenv by jacebrowning 7 years ago
Weirdly,
$ pipenv run python -m pytest
does work.I’m having this exact same issue with a new package I’m working on… https://github.com/fny/thecurator/tree/pipenv-failure
The jsonschema package can’t be found in the tests even though it’s clearly installed in the virtualenv.
I figured out that I was not installing the packages in
dev-packages
block. Usingpipenv install -d
solved the problem.