python - pip install failing to install backend dependencies - Stack Overflow

admin2025-04-29  1

I did a fresh boot of windows and while reinstalling my python packages I keep running into this error

PS C:\Users\david> python3 -m pip install numpy
Collecting numpy
  Downloading numpy-2.2.1.tar.gz (20.2 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 20.2/20.2 MB 42.6 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... error
  error: subprocess-exited-with-error

  × pip subprocess to install backend dependencies did not run successfully.
  │ exit code: 1
  ╰─> [133 lines of output]
      Collecting ninja>=1.8.2
        Downloading ninja-1.11.1.3.tar.gz (129 kB)
        Installing build dependencies: started
        Installing build dependencies: finished with status 'done'
        Getting requirements to build wheel: started
        Getting requirements to build wheel: finished with status 'done'
        Installing backend dependencies: started
        Installing backend dependencies: finished with status 'error'
        error: subprocess-exited-with-error

        pip subprocess to install backend dependencies did not run successfully.
        exit code: 1

        [108 lines of output]
        Collecting setuptools-scm
          Downloading setuptools_scm-8.1.0-py3-none-any.whl.metadata (6.6 kB)
        Collecting cmake>=3.15
          Downloading cmake-3.31.2.tar.gz (34 kB)
          Installing build dependencies: started
          Installing build dependencies: finished with status 'done'
          Getting requirements to build wheel: started
          Getting requirements to build wheel: finished with status 'done'
          Preparing metadata (pyproject.toml): started
          Preparing metadata (pyproject.toml): finished with status 'done'
        Collecting hatch-fancy-pypi-readme>=22.3
          Downloading hatch_fancy_pypi_readme-24.1.0-py3-none-any.whl.metadata (2.0 kB)
        Collecting packaging>=20 (from setuptools-scm)
          Using cached packaging-24.2-py3-none-any.whl.metadata (3.2 kB)
        Collecting setuptools (from setuptools-scm)
          Downloading setuptools-75.7.0-py3-none-any.whl.metadata (6.7 kB)
        Collecting hatchling (from hatch-fancy-pypi-readme>=22.3)
          Downloading hatchling-1.27.0-py3-none-any.whl.metadata (3.8 kB)
        Collecting pathspec>=0.10.1 (from hatchling->hatch-fancy-pypi-readme>=22.3)
          Using cached pathspec-0.12.1-py3-none-any.whl.metadata (21 kB)
        Collecting pluggy>=1.0.0 (from hatchling->hatch-fancy-pypi-readme>=22.3)
          Downloading pluggy-1.5.0-py3-none-any.whl.metadata (4.8 kB)
        Collecting trove-classifiers (from hatchling->hatch-fancy-pypi-readme>=22.3)
          Downloading trove_classifiers-2025.1.6.15-py3-none-any.whl.metadata (2.2 kB)
        Downloading setuptools_scm-8.1.0-py3-none-any.whl (43 kB)
        Downloading hatch_fancy_pypi_readme-24.1.0-py3-none-any.whl (10 kB)
        Using cached packaging-24.2-py3-none-any.whl (65 kB)
        Downloading hatchling-1.27.0-py3-none-any.whl (75 kB)
        Downloading setuptools-75.7.0-py3-none-any.whl (1.2 MB)
           ---------------------------------------- 1.2/1.2 MB 15.3 MB/s eta 0:00:00
        Using cached pathspec-0.12.1-py3-none-any.whl (31 kB)
        Downloading pluggy-1.5.0-py3-none-any.whl (20 kB)
        Downloading trove_classifiers-2025.1.6.15-py3-none-any.whl (13 kB)
        Building wheels for collected packages: cmake
          Building wheel for cmake (pyproject.toml): started
          Building wheel for cmake (pyproject.toml): finished with status 'error'
          error: subprocess-exited-with-error

          Building wheel for cmake (pyproject.toml) did not run successfully.
          exit code: 1

          [60 lines of output]
          Traceback (most recent call last):
            File "C:\msys64\ucrt64\lib\python3.11\urllib\request.py", line 1348, in do_open
              h.request(req.get_method(), req.selector, req.data, headers,
            File "C:\msys64\ucrt64\lib\python3.11\http\client.py", line 1294, in request
              self._send_request(method, url, body, headers, encode_chunked)
            File "C:\msys64\ucrt64\lib\python3.11\http\client.py", line 1340, in _send_request
              self.endheaders(body, encode_chunked=encode_chunked)
            File "C:\msys64\ucrt64\lib\python3.11\http\client.py", line 1289, in endheaders
              self._send_output(message_body, encode_chunked=encode_chunked)
            File "C:\msys64\ucrt64\lib\python3.11\http\client.py", line 1048, in _send_output
              self.send(msg)
            File "C:\msys64\ucrt64\lib\python3.11\http\client.py", line 986, in send
              self.connect()
            File "C:\msys64\ucrt64\lib\python3.11\http\client.py", line 1466, in connect
              self.sock = self._context.wrap_socket(self.sock,
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            File "C:\msys64\ucrt64\lib\python3.11\ssl.py", line 517, in wrap_socket
              return self.sslsocket_class._create(
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            File "C:\msys64\ucrt64\lib\python3.11\ssl.py", line 1108, in _create
              self.do_handshake()
            File "C:\msys64\ucrt64\lib\python3.11\ssl.py", line 1383, in do_handshake
              self._sslobj.do_handshake()
          ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1006)

          During handling of the above exception, another exception occurred:

          Traceback (most recent call last):
            File "C:\msys64\ucrt64\lib\python3.11\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
              main()
            File "C:\msys64\ucrt64\lib\python3.11\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
              json_out['return_val'] = hook(**hook_input['kwargs'])
                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            File "C:\msys64\ucrt64\lib\python3.11\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 251, in build_wheel
              return _build_backend().build_wheel(wheel_directory, config_settings,
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            File "C:\Users\david\AppData\Local\Temp\pip-install-asx64kyy\cmake_7260e98108244fe5aff2fac585dc6406\_build_backend\backend.py", line 156, in build_wheel
              cmake_path = _bootstrap_build(temp_path, config_settings)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            File "C:\Users\david\AppData\Local\Temp\pip-install-asx64kyy\cmake_7260e98108244fe5aff2fac585dc6406\_build_backend\backend.py", line 103, in _bootstrap_build
              with urllib.request.urlopen(archive_url) as response:
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            File "C:\msys64\ucrt64\lib\python3.11\urllib\request.py", line 216, in urlopen
              return opener.open(url, data, timeout)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            File "C:\msys64\ucrt64\lib\python3.11\urllib\request.py", line 519, in open
              response = self._open(req, data)
                         ^^^^^^^^^^^^^^^^^^^^^
            File "C:\msys64\ucrt64\lib\python3.11\urllib\request.py", line 536, in _open
              result = self._call_chain(self.handle_open, protocol, protocol +
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            File "C:\msys64\ucrt64\lib\python3.11\urllib\request.py", line 496, in _call_chain
              result = func(*args)
                       ^^^^^^^^^^^
            File "C:\msys64\ucrt64\lib\python3.11\urllib\request.py", line 1391, in https_open
              return self.do_open(http.client.HTTPSConnection, req,
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            File "C:\msys64\ucrt64\lib\python3.11\urllib\request.py", line 1351, in do_open
              raise URLError(err)
          urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1006)>
          [end of output]

          note: This error originates from a subprocess, and is likely not a problem with pip.
          ERROR: Failed building wheel for cmake
        Failed to build cmake
        ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (cmake)
        [end of output]

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

      pip subprocess to install backend dependencies did not run successfully.
      exit code: 1

      See above for output.

      note: This error originates from a subprocess, and is likely not a problem with pip.
      [end of output]

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

× pip subprocess to install backend dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.

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

I have tried reinstalling pip setup tools, clearing pip cache, I even tried uninstalling and reinstalling python. I am on python 3.11.7.

This happens whether or not I am installing to the global python environment or to a venv. Any advice?

I did a fresh boot of windows and while reinstalling my python packages I keep running into this error

PS C:\Users\david> python3 -m pip install numpy
Collecting numpy
  Downloading numpy-2.2.1.tar.gz (20.2 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 20.2/20.2 MB 42.6 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... error
  error: subprocess-exited-with-error

  × pip subprocess to install backend dependencies did not run successfully.
  │ exit code: 1
  ╰─> [133 lines of output]
      Collecting ninja>=1.8.2
        Downloading ninja-1.11.1.3.tar.gz (129 kB)
        Installing build dependencies: started
        Installing build dependencies: finished with status 'done'
        Getting requirements to build wheel: started
        Getting requirements to build wheel: finished with status 'done'
        Installing backend dependencies: started
        Installing backend dependencies: finished with status 'error'
        error: subprocess-exited-with-error

        pip subprocess to install backend dependencies did not run successfully.
        exit code: 1

        [108 lines of output]
        Collecting setuptools-scm
          Downloading setuptools_scm-8.1.0-py3-none-any.whl.metadata (6.6 kB)
        Collecting cmake>=3.15
          Downloading cmake-3.31.2.tar.gz (34 kB)
          Installing build dependencies: started
          Installing build dependencies: finished with status 'done'
          Getting requirements to build wheel: started
          Getting requirements to build wheel: finished with status 'done'
          Preparing metadata (pyproject.toml): started
          Preparing metadata (pyproject.toml): finished with status 'done'
        Collecting hatch-fancy-pypi-readme>=22.3
          Downloading hatch_fancy_pypi_readme-24.1.0-py3-none-any.whl.metadata (2.0 kB)
        Collecting packaging>=20 (from setuptools-scm)
          Using cached packaging-24.2-py3-none-any.whl.metadata (3.2 kB)
        Collecting setuptools (from setuptools-scm)
          Downloading setuptools-75.7.0-py3-none-any.whl.metadata (6.7 kB)
        Collecting hatchling (from hatch-fancy-pypi-readme>=22.3)
          Downloading hatchling-1.27.0-py3-none-any.whl.metadata (3.8 kB)
        Collecting pathspec>=0.10.1 (from hatchling->hatch-fancy-pypi-readme>=22.3)
          Using cached pathspec-0.12.1-py3-none-any.whl.metadata (21 kB)
        Collecting pluggy>=1.0.0 (from hatchling->hatch-fancy-pypi-readme>=22.3)
          Downloading pluggy-1.5.0-py3-none-any.whl.metadata (4.8 kB)
        Collecting trove-classifiers (from hatchling->hatch-fancy-pypi-readme>=22.3)
          Downloading trove_classifiers-2025.1.6.15-py3-none-any.whl.metadata (2.2 kB)
        Downloading setuptools_scm-8.1.0-py3-none-any.whl (43 kB)
        Downloading hatch_fancy_pypi_readme-24.1.0-py3-none-any.whl (10 kB)
        Using cached packaging-24.2-py3-none-any.whl (65 kB)
        Downloading hatchling-1.27.0-py3-none-any.whl (75 kB)
        Downloading setuptools-75.7.0-py3-none-any.whl (1.2 MB)
           ---------------------------------------- 1.2/1.2 MB 15.3 MB/s eta 0:00:00
        Using cached pathspec-0.12.1-py3-none-any.whl (31 kB)
        Downloading pluggy-1.5.0-py3-none-any.whl (20 kB)
        Downloading trove_classifiers-2025.1.6.15-py3-none-any.whl (13 kB)
        Building wheels for collected packages: cmake
          Building wheel for cmake (pyproject.toml): started
          Building wheel for cmake (pyproject.toml): finished with status 'error'
          error: subprocess-exited-with-error

          Building wheel for cmake (pyproject.toml) did not run successfully.
          exit code: 1

          [60 lines of output]
          Traceback (most recent call last):
            File "C:\msys64\ucrt64\lib\python3.11\urllib\request.py", line 1348, in do_open
              h.request(req.get_method(), req.selector, req.data, headers,
            File "C:\msys64\ucrt64\lib\python3.11\http\client.py", line 1294, in request
              self._send_request(method, url, body, headers, encode_chunked)
            File "C:\msys64\ucrt64\lib\python3.11\http\client.py", line 1340, in _send_request
              self.endheaders(body, encode_chunked=encode_chunked)
            File "C:\msys64\ucrt64\lib\python3.11\http\client.py", line 1289, in endheaders
              self._send_output(message_body, encode_chunked=encode_chunked)
            File "C:\msys64\ucrt64\lib\python3.11\http\client.py", line 1048, in _send_output
              self.send(msg)
            File "C:\msys64\ucrt64\lib\python3.11\http\client.py", line 986, in send
              self.connect()
            File "C:\msys64\ucrt64\lib\python3.11\http\client.py", line 1466, in connect
              self.sock = self._context.wrap_socket(self.sock,
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            File "C:\msys64\ucrt64\lib\python3.11\ssl.py", line 517, in wrap_socket
              return self.sslsocket_class._create(
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            File "C:\msys64\ucrt64\lib\python3.11\ssl.py", line 1108, in _create
              self.do_handshake()
            File "C:\msys64\ucrt64\lib\python3.11\ssl.py", line 1383, in do_handshake
              self._sslobj.do_handshake()
          ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1006)

          During handling of the above exception, another exception occurred:

          Traceback (most recent call last):
            File "C:\msys64\ucrt64\lib\python3.11\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
              main()
            File "C:\msys64\ucrt64\lib\python3.11\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
              json_out['return_val'] = hook(**hook_input['kwargs'])
                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            File "C:\msys64\ucrt64\lib\python3.11\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 251, in build_wheel
              return _build_backend().build_wheel(wheel_directory, config_settings,
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            File "C:\Users\david\AppData\Local\Temp\pip-install-asx64kyy\cmake_7260e98108244fe5aff2fac585dc6406\_build_backend\backend.py", line 156, in build_wheel
              cmake_path = _bootstrap_build(temp_path, config_settings)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            File "C:\Users\david\AppData\Local\Temp\pip-install-asx64kyy\cmake_7260e98108244fe5aff2fac585dc6406\_build_backend\backend.py", line 103, in _bootstrap_build
              with urllib.request.urlopen(archive_url) as response:
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            File "C:\msys64\ucrt64\lib\python3.11\urllib\request.py", line 216, in urlopen
              return opener.open(url, data, timeout)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            File "C:\msys64\ucrt64\lib\python3.11\urllib\request.py", line 519, in open
              response = self._open(req, data)
                         ^^^^^^^^^^^^^^^^^^^^^
            File "C:\msys64\ucrt64\lib\python3.11\urllib\request.py", line 536, in _open
              result = self._call_chain(self.handle_open, protocol, protocol +
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            File "C:\msys64\ucrt64\lib\python3.11\urllib\request.py", line 496, in _call_chain
              result = func(*args)
                       ^^^^^^^^^^^
            File "C:\msys64\ucrt64\lib\python3.11\urllib\request.py", line 1391, in https_open
              return self.do_open(http.client.HTTPSConnection, req,
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            File "C:\msys64\ucrt64\lib\python3.11\urllib\request.py", line 1351, in do_open
              raise URLError(err)
          urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1006)>
          [end of output]

          note: This error originates from a subprocess, and is likely not a problem with pip.
          ERROR: Failed building wheel for cmake
        Failed to build cmake
        ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (cmake)
        [end of output]

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

      pip subprocess to install backend dependencies did not run successfully.
      exit code: 1

      See above for output.

      note: This error originates from a subprocess, and is likely not a problem with pip.
      [end of output]

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

× pip subprocess to install backend dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.

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

I have tried reinstalling pip setup tools, clearing pip cache, I even tried uninstalling and reinstalling python. I am on python 3.11.7.

This happens whether or not I am installing to the global python environment or to a venv. Any advice?

Share Improve this question asked Jan 7 at 1:19 Bryce SmithBryce Smith 654 bronze badges 7
  • Did you try to install the latest Python version? Or you need 3.11.7 for specific reason? – nikitimi Commented Jan 7 at 1:22
  • I have 3.13.1 installed but the version I get when I run python3 --version is 3.11.7 – Bryce Smith Commented Jan 7 at 1:30
  • You can change the Python version to be executed in your Windows Environment variables within Path. – nikitimi Commented Jan 7 at 1:36
  • Also I think you can drop the '3' in the command. python3 <args> -> python <args> – nikitimi Commented Jan 7 at 1:41
  • I have my path variable set as C:\Users\david\AppData\Roaming\Python\Python313\Scripts which is where my ipython3.exe is stored. When I run pip from the ipython3.exe, it works fine. – Bryce Smith Commented Jan 7 at 1:47
 |  Show 2 more comments

1 Answer 1

Reset to default 0

I solved it, after a while of digging, I found that I needed to remove \Scripts from my path and move the python path to the top of the PATH environment variable because Powershell was reading C:\mysys64\ucrt64\bin before the python 3.13.1. The version of python in this folder was 3.11.7.

转载请注明原文地址:http://anycun.com/QandA/1745935607a91344.html