You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

使用pip --cert安装tflite_support时遇subprocess-exited-with-error错误求助

问题描述

在Anaconda Prompt中执行以下命令:

pip --cert "D:\DDownloads\MyCert.pem" install tflite_support

出现如下错误:

Collecting tflite_support
  Using cached tflite-support-0.1.0a1.tar.gz (390 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [58 lines of output]
      D:\AI\Anaconda\Lib\site-packages\setuptools\__init__.py:84: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
      !!

              ********************************************************************************
              Requirements should be satisfied by a PEP 517 installer.
              If you are using pip, you can try `pip install --use-pep517`.
              ********************************************************************************

      !!
        dist.fetch_build_eggs(dist.setup_requires)
      WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1006)'))': /simple/pybind11/
      WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1006)'))': /simple/pybind11/
      WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1006)'))': /simple/pybind11/
      WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1006)'))': /simple/pybind11/
      WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1006)'))': /simple/pybind11/
      ERROR: Could not find a version that satisfies the requirement pybind11>=2.4 (from versions: none)
      ERROR: No matching distribution found for pybind11>=2.4
      Traceback (most recent call last):
        File "D:\AI\Anaconda\Lib\site-packages\setuptools\installer.py", line 96, in _fetch_build_egg_no_warn
          subprocess.check_call(cmd)
        File "D:\AI\Anaconda\Lib\subprocess.py", line 413, in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '['D:\\AI\\Anaconda\\python.exe', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', 'C:\\Users\\user.sk\\AppData\\Local\\Temp\\tmpfjgjp7hu', '--quiet', 'pybind11>=2.4']' returned non-zero exit status 1.

      The above exception was the direct cause of the following exception:

      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "C:\Users\user.sk\AppData\Local\Temp\pip-install-ok_9cx2o\tflite-support_76f7e4f7f27f407ba020192d982c23a5\setup.py", line 143, in <module>
          setup(
        File "D:\AI\Anaconda\Lib\site-packages\setuptools\__init__.py", line 106, in setup
          _install_setup_requires(attrs)
        File "D:\AI\Anaconda\Lib\site-packages\setuptools\__init__.py", line 79, in _install_setup_requires
          _fetch_build_eggs(dist)
        File "D:\AI\Anaconda\Lib\site-packages\setuptools\__init__.py", line 84, in _fetch_build_eggs
          dist.fetch_build_eggs(dist.setup_requires)
        File "D:\AI\Anaconda\Lib\site-packages\setuptools\dist.py", line 907, in fetch_build_eggs
          return _fetch_build_eggs(self, requires)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "D:\AI\Anaconda\Lib\site-packages\setuptools\installer.py", line 38, in _fetch_build_eggs
          resolved_dists = pkg_resources.working_set.resolve(
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "D:\AI\Anaconda\Lib\site-packages\pkg_resources\__init__.py", line 829, in resolve
          dist = self._resolve_dist(
                 ^^^^^^^^^^^^^^^^^^^
        File "D:\AI\Anaconda\Lib\site-packages\pkg_resources\__init__.py", line 865, in _resolve_dist
          dist = best[req.key] = env.best_match(
                                 ^^^^^^^^^^^^^^^
        File "D:\AI\Anaconda\Lib\site-packages\pkg_resources\__init__.py", line 1135, in best_match
          return self.obtain(req, installer)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "D:\AI\Anaconda\Lib\site-packages\pkg_resources\__init__.py", line 1147, in obtain
          return installer(requirement)
                 ^^^^^^^^^^^^^^^^^^^^^^
        File "D:\AI\Anaconda\Lib\site-packages\setuptools\installer.py", line 98, in _fetch_build_egg_no_warn
          raise DistutilsError(str(e)) from e
      distutils.errors.DistutilsError: Command '['D:\\AI\\Anaconda\\python.exe', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', 'C:\\Users\\user.sk\\AppData\\Local\\Temp\\tmpfjgjp7hu', '--quiet', 'pybind11>=2.4']' returned non-zero exit status 1.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

已持有曾成功使用的有效证书,如何解决该问题?

解决方案

核心问题:安装tflite_support时,其setup.py会启动子进程安装依赖pybind11,但子进程未继承你指定的证书参数,导致SSL验证失败。

方法1:手动先装依赖,再装目标包

  1. 先指定证书安装pybind11:
pip --cert "D:\DDownloads\MyCert.pem" install pybind11>=2.4
  1. 再安装tflite_support:
pip --cert "D:\DDownloads\MyCert.pem" install tflite_support

方法2:配置pip全局证书,避免重复指定

  1. Windows系统:在C:\Users\<你的用户名>\pip目录下创建/修改pip.ini文件,写入:
[global]
cert = D:\DDownloads\MyCert.pem
  1. 保存后直接执行安装命令即可:
pip install tflite_support

方法3:使用PEP 517安装方式(错误提示推荐)

执行命令时添加--use-pep517参数,绕过旧的setup.py依赖安装逻辑:

pip --cert "D:\DDownloads\MyCert.pem" install tflite_support --use-pep517

内容的提问来源于stack exchange,提问作者Sazzad Hissain Khan

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.05 15:20:00