What do square brackets mean in pip installation?

I see more and more of these commands:

$ pip install "splinter[django]"

What do these square brackets do?

+41
source share
3 answers

The syntax you use is:

pip install "project[extra]"

In your case, you are a installingpackage splinterin which support is added django. Square brackets ( []) is not a specific syntax, but just a convention. In fact, you install a package with the name: "splinter[django]".

Explanation from @chetner:

pip install splinter django splinter django. splinter[django], , splinter, django. , django, , splinter , .

+40

This is exactly the list from the setup.pyfile for the project in question :

"django": ["Django>=1.7.11;python_version<'3.0'", "Django>=2.0.6;python_version>'3.3'", "lxml>=2.3.6", "cssselect", "six"],
0
source

All Articles