[Solution] zsh: no matches found: requests[security]

While trying to run a python urllib2 script and getting this error:

InsecurePlatformWarning: A true SSLContext object is not available.
This prevents urllib3 from configuring SSL appropriately and may cause
certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.

After googling the mistake the solution, on stack overflow is to download the requests’ safety package:

pip install requests[security]

But After running, we are getting an error:

zsh: no matches found: requests[security]

Also Read | zsh: Command Not Found Conda

Solution for zsh: no matches found: requests[security]

We have a solution for this error,

zsh uses square brackets for globbing / pattern matching.

In that manner that in case you want to skip literal rectangular brackets as an issue to a command, you both want to get away from them or quote the argument like this:

pip install 'requests[security]'

If you need to disable globbing for the pip command permanently, you may accomplish that by including this in your ~/.zshrc:

alias pip='noglob pip'

All methods were sourced from stackoverflow.com or stackexchange.com, are licensed under cc by-sa 2.5cc by-sa 3.0 and cc by-sa 4.0


Leave a Reply

Your email address will not be published. Required fields are marked *