Installing optional dependencies for Python libraries in zsh
super short post alert
If you’re using zsh as your shell and trying to install an optional dependency of a Python library, you’ll end up with a no matches found
error, for example:
> pip install gql[all]
zsh: no matches found: gql[all]
This has to do with the way zsh handles square brackets. Instead you can use single quotes to escape the library name, like this:
pip install 'gql[all]'
That’s it! This has been posted in various other online forums but I wanted a spot to document it for myself since I was caught rather off-guard by the error message.