I want to create a python package mycode
, to be installed using pip
(setup.py
), which has a dependency on another package base
. To incoporate this package dependency I follow the setup.py instructions and created an entry in the setup
function of setup.py
which reads:
'requires': ['base']
After I have created the package with python setup.py sdist
, I tried to install it via pip install
, which successfully installed mycode
, but nothing from base
. It seems like the requires
entry in setup.py
was ignored.
Any ideas what is going wrong?
You need to specify install_requires
instead, see New and changed setup
keywords.
The requires
field was too vague and imprecise, so the setuptools
folk (so easy_install
, from which pip
evolved) added more specific fields. In addition, there are setup_requires
and test_requires
fields for dependencies required for setup.py
and for running tests.
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