Front-end
Apple
Apple
  • 第三方库
    • RAC库
      • ReactiveObjc
        • 如何实现的
        • 有关类
        • 有关协议
        • 关键概念列表
          • RACSignal有关类
            • RACStream
              • 头文件定义
            • RACSignal
              • 头文件定义内容
              • 核心代码
              • 常用的方法
                • concat:
                • bind:
                • zipWith 和merge
            • RACSubject
              • 内容
            • RACReplaySubject
              • 内容
            • RACBehaviorSubject
              • 内容
            • RACGroupedSignal
              • 内容
            • RACDynamicSignal
              • RACDynamicSignal
              • RACSignal vs RACDynamicSignal
            • RACReturnSignal
              • 内容
            • RACErrorSignal
            • RACEmptySignal
            • RACChannelTerminal
            • 疑问
              • RACChannelTerminal vs RACSubject
              • RACSignal vs RACStream
              • 热信号和冷信号
                • 进一步理解
              • 信号的发送者和接受者
                • RACSignal 不是信号对象么?为什么信号的发送者是自己呢?
          • RACChannel有关类
            • RACChannel
              • Page 1
              • 用于MVVM架构
              • RAC() vs RACChannelTo()
            • RACKVOChannel
              • 内容
              • 封装了系统的KVO
          • RACCommand
          • RACSubscriber
          • RACTuple
          • RACSequence有关类
          • RACKVOTrampoline
            • NSObject+RACKVOWrapper.h
            • NSObject+RACKVOWrapper.m
          • Page
          • 宏
          • 疑问
            • RACCommand vs RACSignal
            • 有了信号量,为什么还需要RACCommand
        • 操作方法
          • reduce
            • reduce 在不同语言以及库中是否一样的概念?
      • ReactiveSwift
        • 相比ReactiveObjc
      • RxSwift
      • Combine
      • 疑问
        • 热信号 vs 冷信号
        • ReactiveObjC 和 ReactiveSwift 实现原理差异
        • ReactiveObjC、ReactiveCocoa、ReactiveSwift的关系与区别
        • ReactiveObjC、ReactiveCocoa、ReactiveSwift内容
        • ReactiveSwift vs RxSwift
        • RxSwift、ReactiveSwift 和 ReactiveObjC
        • RxSwift、ReactiveSwift 、Combine
    • swift源码
      • 编译
        • 命令参数解释
        • 涉及到的工具
          • cmake 和 ninja
          • sccache
        • Rosetta模式
        • 遇到问题
          • FETCH_HEAD': Permission denied
          • --local_compiler_build': No such file or directory
          • ld: unsupported tapi file type '!tapi-tbd' in YAML file
          • python --version 显示没有这个命令
          • ModuleNotFoundError: No module named 'packaging'
          • ModuleNotFoundError: No module named 'sphinx'
            • sphinx是什么
          • ERROR: Could not find a version that satisfies the requirement sphinx (from versions: none)
          • /Applications/Python\ 3.x/Install\ Certificates.command 失败
          • 已经安装了sphinx,还是显示错误
      • 涉及到的知识点
        • Swift中的MCCAS
Powered by GitBook
On this page
  1. 第三方库
  2. swift源码
  3. 编译
  4. 遇到问题

ERROR: Could not find a version that satisfies the requirement sphinx (from versions: none)

Previoussphinx是什么Next/Applications/Python\ 3.x/Install\ Certificates.command 失败

Last updated 8 months ago

Could not fetch URL https://pypi.org/simple/sphinx/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/sphinx/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)'))) - skipping
ERROR: Could not find a version that satisfies the requirement sphinx (from versions: none)
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)'))) - skipping
ERROR: No matching distribution found for sphinx

如果你在安装 Sphinx 时遇到 ERROR: Could not find a version that satisfies the requirement sphinx (from versions: none) 错误,可能是由于以下几个原因造成的。以下是一些解决方法:

步骤 0:很可能是命令行的验证过期了,需要中心验证

您遇到的错误信息表明在使用 pip 安装 Sphinx 时,由于 SSL 证书验证失败,导致无法连接到 PyPI。这种问题通常与 Python 环境中缺少根证书有关。以下是一些解决方案,帮助您解决此问题:

步骤1. 更新证书

运行以下命令,更新证书:

/Applications/Python\ 3.x/Install\ Certificates.command

请确保将 3.x 替换为您实际安装的 Python 版本(例如:3.9)。

步骤2. 使用 --trusted-host 选项

在安装 Sphinx 时,您可以临时信任 PyPI,以绕过 SSL 验证。这可以通过在 pip 命令中添加 --trusted-host 选项来实现:

pip install sphinx --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org

步骤 3:更新 pip

有时,pip 版本过旧可能导致无法找到可用的包。你可以通过以下命令更新 pip:

pip install --upgrade pip

步骤 4:检查网络连接

确保你的计算机能够连接到互联网,有时网络问题会导致 pip 无法找到所需的包。

步骤 5:使用 PyPI 镜像

在某些地区,直接访问 PyPI 可能会有问题。你可以使用国内镜像来安装 Sphinx。例如,使用清华大学的 PyPI 镜像:

pip install sphinx -i https://pypi.tuna.tsinghua.edu.cn/simple

步骤 6:手动安装

  1. 下载源代码并解压。

  2. 进入源代码目录:

    cd sphinx-<version>
  3. 运行安装:

    python setup.py install

结论

完成以上步骤后,应该能够成功安装 Sphinx。如果问题依然存在,请提供详细信息以便进行进一步分析。

如果以上步骤都未能解决问题,可以尝试手动安装 Sphinx。你可以从 下载源代码,然后通过以下命令进行安装:

遇到这个命令更新失败,需要强制更新这个证书。
Sphinx GitHub 仓库