我正在尝试使用python从网络获取数据。我为此导入了urllib.request包,但是在执行时出现错误:
certificate verify failed: unable to get local issuer certificate (_ssl.c:1045)
Run Code Online (Sandbox Code Playgroud)
当我将网址更改为“ http”时-我可以获取数据。但是,我相信,这避免了检查SSL证书。
所以我检查了互联网,找到了一个解决方案:运行 /Applications/Python\ 3.7/Install\ Certificates.command
这解决了我的问题。但是我对SSL之类的东西一无所知。您能否帮助我了解它实际上解决了我的问题。
如果可能,请向我推荐任何有用的资源,以了解有关安全性和证书的信息。我是新来的。
谢谢!
注意:我确实通过链接-openssl,python请求错误:“证书验证失败”
我的问题与链接中的问题不同,因为我想知道在安装certifi软件包或运行Install\ Certificates.command该错误时实际发生了什么。我对证券知之甚少。
Poetry 官方文档严格建议使用官方安装程序。然而,自制有诗歌公式。
brew install poetry
Run Code Online (Sandbox Code Playgroud)
通常,我喜欢将所有内容保留在自制程序中,以便轻松管理安装。
使用自制软件而不是推荐的安装脚本安装诗歌有什么缺点和风险?
如何升级到最新版本?
\n规格:
\n当前版本:
\nme@PF2DCSXD:/mnt/c/Users/user/Documents/GitHub/workers-python/workers/composite_key/compositekey/tests$ python3 --version\nPython 3.8.10\nRun Code Online (Sandbox Code Playgroud)\n尝试更新 | poetry self update:
me@PF2DCSXD:/mnt/c/Users/user/Documents/GitHub/workers-python/workers/composite_key/compositekey/tests$ poetry self update\n\n RuntimeError\n\n Poetry was not installed with the recommended installer. Cannot update automatically.\n\n at ~/.local/lib/python3.8/site-packages/poetry/console/commands/self/update.py:389 in _check_recommended_installation\n 385\xe2\x94\x82 current = Path(__file__)\n 386\xe2\x94\x82 try:\n 387\xe2\x94\x82 current.relative_to(self.home)\n 388\xe2\x94\x82 except ValueError:\n \xe2\x86\x92 389\xe2\x94\x82 raise RuntimeError(\n 390\xe2\x94\x82 "Poetry was not installed with the recommended installer. "\n 391\xe2\x94\x82 "Cannot update automatically."\n …Run Code Online (Sandbox Code Playgroud)