We are using pip -e .
to install our package in editable/development mode, instead of using python setup.py develop
. (We have to do so, because we pull packages from the public PyPi server and a private one. This did not worked for us using python setup.py develop
.)
But pip -e .
does not install test dependencies and I could not find some flag to force it to do so. How do I install test dependencies using pip?
Pip will not flag dependency conflicts. As a result, it will happily install multiple versions of a dependency into your project, which will likely result in errors. One way to avoid dependency conflicts is to use an alternative Python package manager, like conda, poetry or ActiveState's State Tool.
Pip Check Command – Check Python Dependencies After Installation. Because pip doesn't currently address dependency issues on installation, the pip check command option can be used to verify that dependencies have been installed properly in your project. For example: $ pip check No broken requirements found.
I use extra_require
in the setup.py as specified here. For example:
setup(
name="Project-A",
...
extras_require={
'develop': ["mock==2.0.0"],
}
)
And to execute it using pip install
:
pip install -e .[develop]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With