Pytest says 'ModuleNotFoundError' when using tox
What helped me:
- Add missing modules to the
install_requires
section of thesetup.py
- Delete old
.tox
directory and re-runtox
[tox]skipsdist = True
prevents tox
to run python setup.py sdist
so your install_requires
is completely ignored.
If you really want to follow the advice to set [tox]skipsdist = True
for applications you are also advised to follow all other best practices for packaging applications: use requirements.txt
and add
[testenv]
deps =
-rrequirements.txt
to tox.ini
. Or just directly
[testenv]
deps = python-dateutil