The Python Oracle

zsh: no matches found: requests[security]

--------------------------------------------------
Rise to the top 3% as a developer or hire one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------

Music by Eric Matyas
https://www.soundimage.org
Track title: Life in a Drop

--

Chapters
00:00 Zsh: No Matches Found: Requests[Security]
00:53 Accepted Answer Score 634
01:17 Answer 2 Score 13
01:26 Thank you

--

Full question
https://stackoverflow.com/questions/3053...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#python #pip #pythonrequests #zsh

#avk47



ACCEPTED ANSWER

Score 634


zsh uses square brackets for globbing / pattern matching.

That means that if you need to pass literal square brackets as an argument to a command, you either need to escape them or quote the argument like this:

pip install 'requests[security]'

If you want to disable globbing for the pip command permanently, you can do so by adding this to your ~/.zshrc:

alias pip='noglob pip'



ANSWER 2

Score 13


Use instead:

pip install requests\[security\]

Works flawlessly on MacOS with zsh.