我想使用python的第三方庫,但是我的IDE給我一個錯誤代碼:
D:\untitled\venv\Scripts\python.exe "D:/py code/venv/sxsxsxsxs.py"
Traceback (most recent call last):
File "D:\untitled\venv\lib\site-packages\urllib3\connectionpool.py", line 597, in urlopen
self._prepare_proxy(conn)
File "D:\untitled\venv\lib\site-packages\urllib3\connectionpool.py", line 807, in _prepare_proxy
conn.connect()
File "D:\untitled\venv\lib\site-packages\urllib3\connection.py", line 370, in connect
ssl_context=context)
File "D:\untitled\venv\lib\site-packages\urllib3\util\ssl_.py", line 355, in ssl_wrap_socket
return context.wrap_socket(sock, server_hostname=server_hostname)
File "F:\the low ide of python\lib\ssl.py", line 412, in wrap_socket
session=session
File "F:\the low ide of python\lib\ssl.py", line 853, in _create
self.do_handshake()
File "F:\the low ide of python\lib\ssl.py", line 1117, in do_handshake
self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\untitled\venv\lib\site-packages\requests\adapters.py", line 449, in send
timeout=timeout
File "D:\untitled\venv\lib\site-packages\urllib3\connectionpool.py", line 641, in urlopen
_stacktrace=sys.exc_info()[2])
File "D:\untitled\venv\lib\site-packages\urllib3\util\retry.py", line 399, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='www.baidu.com', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)')))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:/py code/venv/sxsxsxsxs.py", line 3, in
response=requests.get(url)
File "D:\untitled\venv\lib\site-packages\requests\api.py", line 75, in get
return request('get', url, params=params, **kwargs)
File "D:\untitled\venv\lib\site-packages\requests\api.py", line 60, in request
return session.request(method=method, url=url, **kwargs)
File "D:\untitled\venv\lib\site-packages\requests\sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "D:\untitled\venv\lib\site-packages\requests\sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "D:\untitled\venv\lib\site-packages\requests\adapters.py", line 514, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='www.baidu.com', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)')))
進程已結束,退出代碼 1
我覺得不應該是因為軟件本身的原因,也許是我還有沒有配置好,希望明天我可以使用那些世界上最棒的第三方庫,另外,我的IDE使用的 project interpreter 是IDLE,我很好奇為什么最好的pythonIDE不會自帶或者有官方的project interpreter 而要用戶去自己下載一個外部組件作為它的PIT,并且,在設定路徑時,連IDLE的全體文件都不需要包括,直接用.exe就可以了,難道這不會出亂子嗎???也許是我學的東西太少了,不對,是本來學的東西就少。繼續努力了。
更多文章、技術交流、商務合作、聯系博主
微信掃碼或搜索:z360901061

微信掃一掃加我為好友
QQ號聯系: 360901061
您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點擊下面給點支持吧,站長非常感激您!手機微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點擊微信右上角掃一掃功能,選擇支付二維碼完成支付。
【本文對您有幫助就好】元
