容易饿的奥利奥 2025-06-12 16:43 采纳率: 0%
浏览 5

python使用pip安装jupter报错,并且用conda安装jupter后,启动jupter也报一样的错误

使用pip安装jupter报错并且用conda安装jupter后,启动jupter也报一样的错误:WARNING: There was an error checking the latest version of pip.
ERROR: Exception:
Traceback (most recent call last):
File "D:\miniconda\Lib\site-packages\pip_internal\cli\base_command.py", line 106, in _run_wrapper
status = _inner_run()
^^^^^^^^^^^^
File "D:\miniconda\Lib\site-packages\pip_internal\cli\base_command.py", line 97, in _inner_run
return self.run(options, args)
^^^^^^^^^^^^^^^^^^^^^^^
File "D:\miniconda\Lib\site-packages\pip_internal\cli\req_command.py", line 67, in wrapper
return func(self, options, args)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\miniconda\Lib\site-packages\pip_internal\commands\install.py", line 332, in run
session = self.get_default_session(options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\miniconda\Lib\site-packages\pip_internal\cli\index_command.py", line 76, in get_default_session
self._session = self.enter_context(self._build_session(options))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\miniconda\Lib\site-packages\pip_internal\cli\index_command.py", line 95, in _build_session
ssl_context = _create_truststore_ssl_context()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\miniconda\Lib\site-packages\pip_internal\cli\index_command.py", line 40, in _create_truststore_ssl_context
from pip.vendor import truststore
File "D:\miniconda\Lib\site-packages\pip_vendor\truststore_init
.py", line 17, in
_sslobj = _ssl.create_default_context().wrap_bio(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\miniconda\Lib\ssl.py", line 775, in create_default_context
context.load_default_certs(purpose)
File "D:\miniconda\Lib\ssl.py", line 596, in load_default_certs
self._load_windows_store_certs(storename, purpose)
File "D:\miniconda\Lib\ssl.py", line 588, in _load_windows_store_certs
self.load_verify_locations(cadata=certs)
ssl.SSLError: [X509V3: INVALID_CERTIFICATE] invalid certificate (_ssl.c:4047)
请问这种要咋办找了很久都没有解决

  • 写回答

6条回答 默认 最新

  • 阿里嘎多学长 2025-06-12 16:43
    关注

    阿里嘎多学长整理AIGC生成,因移动端显示问题导致当前答案未能完全显示,请使用PC端查看更加详细的解答过程

    问题解答

    你遇到的问题是使用 pip 安装 jupyter 时报错,并且使用 conda 安装 jupyter 后,启动 jupyter 也报错。错误信息中包含 WARNING: There was an error checking the latest version

    可能的解决方案是:

    1. 检查 Python 的 SSL 证书是否正确。可以使用以下命令检查:
    import ssl
    print(ssl.get_default_verify_paths())
    

    如果 SSL 证书不正确,可以尝试更新 SSL 证书。

    1. 使用 pip 安装 jupyter 时,添加 --trusted-host 选项指定可信任的主机:
    pip install --trusted-host pypi.org --trusted-host files.pythonhosted.org jupyter
    
    1. 使用 conda 安装 jupyter 时,尝试使用 --no-ssl-verify 选项:
    conda install --no-ssl-verify jupyter
    
    1. 检查 Python 的版本是否支持 jupyterjupyter 的最低支持版本是 Python 3.6,如果你的 Python 版本低于 3.6,可以升级 Python 版本。

    如果以上解决方案不起作用,可以提供更多的错误信息和环境配置信息,以便更好地帮助你解决问题。

    评论

报告相同问题?

问题事件

  • 创建了问题 6月12日