我正在尝试运行 python urllib2 脚本并收到此错误:
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.
在谷歌上搜索错误解决方案后,堆栈溢出是下载请求的安全包:
pip 安装请求[安全]
但是当我运行它时,我得到了错误......
zsh: no matches found: requests[security]
任何人都知道为什么 zsh 没有选择这个库,它安装/升级请求很好,我不知道为什么这不起作用
我在 Debian 服务器上运行它...
最佳答案
zsh
使用 square brackets for globbing / pattern matching .
这意味着,如果您需要将文字方括号作为参数传递给命令,您要么需要转义它们,要么像这样引用参数:
pip install 'requests[security]'
如果您想禁用 globbing对于 pip
命令永久,您可以通过将其添加到您的 ~/.zshrc
来做到这一 pip :
alias pip='noglob pip'
关于python - zsh:未找到匹配项:请求 [安全],我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30539798/