How to install dependencies with square brackets in python setup.py?

Viewed 677

I am trying to include the ray into my own package. However, there are some dependencies needed for using ray that should be installed via pip install ray[all].

If I just add ray[all] into the install_requires of setup.py, like:

setup(
    ...
    install_requires=[
        ...
        "ray==1.0.0",
        "ray[all]==1.0.0",
    ]
)

Then running pip install -e . can not install the dependencies specified in ray[all]. However, I wish my user can install everything simply via running pip install -e ..

Can anyone provide a solution for this issue? Thanks!

1 Answers

Try pip install -e .[all].

In general pip install -e .[extras] should work for all python packages that are packaged with setuptools.

Related