Skip to content

pip is failing to run on Windows 11 25H2. #8281

Description

@CVFA1

Rustpython's pip is failing to run on Windows 11 25H2.

Error:

C:\Windows\System32>pip install pillow
WARNING: There was an error checking the latest version of pip.
ERROR: Exception:
Traceback (most recent call last):
  File "C:\Users\Vinícius\.cargo\bin\Lib\site-packages\pip\_vendor\truststore\_windows.py", line 340, in _verify_peercerts_impl
    CertAddEncodedCertificateToStore(
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        hIntermediateCertStore,
        ^^^^^^^^^^^^^^^^^^^^^^^
    ...<4 lines>...
        None,
        ^^^^^
    )
    ^
TypeError: wrong type

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\Vinícius\.cargo\bin\Lib\site-packages\pip\_internal\cli\base_command.py", line 109, in _run_wrapper
    status = _inner_run()
  File "C:\Users\Vinícius\.cargo\bin\Lib\site-packages\pip\_internal\cli\base_command.py", line 102, in _inner_run
    return self.run(options, args)
           ~~~~~~~~^^^^^^^^^^^^^^^
  File "C:\Users\Vinícius\.cargo\bin\Lib\site-packages\pip\_internal\cli\req_command.py", line 101, in wrapper
    return func(self, options, args)
  File "C:\Users\Vinícius\.cargo\bin\Lib\site-packages\pip\_internal\commands\install.py", line 479, in run
    requirement_set = resolver.resolve(
        reqs, check_supported_wheels=not options.target_dir
    )
  File "C:\Users\Vinícius\.cargo\bin\Lib\site-packages\pip\_internal\resolution\resolvelib\resolver.py", line 99, in resolve
    result = self._result = resolver.resolve(
                            ~~~~~~~~~~~~~~~~^
        collected.requirements, max_rounds=limit_how_complex_resolution_can_be
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "C:\Users\Vinícius\.cargo\bin\Lib\site-packages\pip\_vendor\resolvelib\resolvers\resolution.py", line 601, in resolve
    state = resolution.resolve(requirements, max_rounds=max_rounds)
  File "C:\Users\Vinícius\.cargo\bin\Lib\site-packages\pip\_vendor\resolvelib\resolvers\resolution.py", line 434, in resolve
    self._add_to_criteria(self.state.criteria, r, parent=None)
    ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Vinícius\.cargo\bin\Lib\site-packages\pip\_vendor\resolvelib\resolvers\resolution.py", line 150, in _add_to_criteria
    if not criterion.candidates:
           ^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Vinícius\.cargo\bin\Lib\site-packages\pip\_vendor\resolvelib\structs.py", line 194, in __bool__
    return bool(self._sequence)
  File "C:\Users\Vinícius\.cargo\bin\Lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py", line 165, in __bool__
    self._bool = any(self)
                 ~~~^^^^^^
  File "C:\Users\Vinícius\.cargo\bin\Lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py", line 149, in <genexpr>
    return (c for c in iterator if id(c) not in self._incompatible_ids)
                       ^^^^^^^^
  File "C:\Users\Vinícius\.cargo\bin\Lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py", line 35, in _iter_built
    for version, func in infos:
                         ^^^^^
  File "C:\Users\Vinícius\.cargo\bin\Lib\site-packages\pip\_internal\resolution\resolvelib\factory.py", line 346, in iter_index_candidate_infos
    result = self._finder.find_best_candidate(
        project_name=name,
        specifier=specifier,
        hashes=hashes,
    )
  File "C:\Users\Vinícius\.cargo\bin\Lib\site-packages\pip\_internal\index\package_finder.py", line 959, in find_best_candidate
    candidates = self.find_all_candidates(project_name)
  File "C:\Users\Vinícius\.cargo\bin\Lib\site-packages\pip\_internal\index\package_finder.py", line 896, in find_all_candidates
    page_candidates = list(page_candidates_it)
  File "C:\Users\Vinícius\.cargo\bin\Lib\site-packages\pip\_internal\index\sources.py", line 196, in page_candidates
    yield from self._candidates_from_page(self._link)
               ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^
  File "C:\Users\Vinícius\.cargo\bin\Lib\site-packages\pip\_internal\index\package_finder.py", line 854, in process_project_url
    index_response = self._link_collector.fetch_response(project_url)
  File "C:\Users\Vinícius\.cargo\bin\Lib\site-packages\pip\_internal\index\collector.py", line 442, in fetch_response
    return _get_index_content(location, session=self.session)
  File "C:\Users\Vinícius\.cargo\bin\Lib\site-packages\pip\_internal\index\collector.py", line 346, in _get_index_content
    resp = _get_simple_response(url, session=session)
  File "C:\Users\Vinícius\.cargo\bin\Lib\site-packages\pip\_internal\index\collector.py", line 126, in _get_simple_response
    resp = session.get(
        url,
    ...<22 lines>...
        },
    )
  File "C:\Users\Vinícius\.cargo\bin\Lib\site-packages\pip\_vendor\requests\sessions.py", line 605, in get
    return self.request("GET", url, **kwargs)
           ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Vinícius\.cargo\bin\Lib\site-packages\pip\_internal\network\session.py", line 537, in request
    return super().request(method, url, *args, **kwargs)
           ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Vinícius\.cargo\bin\Lib\site-packages\pip\_vendor\requests\sessions.py", line 592, in request
    resp = self.send(prep, **send_kwargs)
  File "C:\Users\Vinícius\.cargo\bin\Lib\site-packages\pip\_vendor\requests\sessions.py", line 706, in send
    r = adapter.send(request, **kwargs)
  File "C:\Users\Vinícius\.cargo\bin\Lib\site-packages\pip\_vendor\cachecontrol\adapter.py", line 76, in send
    resp = super().send(request, stream, timeout, verify, cert, proxies)
  File "C:\Users\Vinícius\.cargo\bin\Lib\site-packages\pip\_vendor\requests\adapters.py", line 645, in send
    resp = conn.urlopen(
        method=request.method,
    ...<9 lines>...
        chunked=chunked,
    )
  File "C:\Users\Vinícius\.cargo\bin\Lib\site-packages\pip\_vendor\urllib3\connectionpool.py", line 787, in urlopen
    response = self._make_request(
        conn,
    ...<10 lines>...
        **response_kw,
    )
  File "C:\Users\Vinícius\.cargo\bin\Lib\site-packages\pip\_vendor\urllib3\connectionpool.py", line 464, in _make_request
    self._validate_conn(conn)
    ~~~~~~~~~~~~~~~~~~~^^^^^^
  File "C:\Users\Vinícius\.cargo\bin\Lib\site-packages\pip\_vendor\urllib3\connectionpool.py", line 1093, in _validate_conn
    conn.connect()
    ~~~~~~~~~~~~^^
  File "C:\Users\Vinícius\.cargo\bin\Lib\site-packages\pip\_vendor\urllib3\connection.py", line 796, in connect
    sock_and_verified = _ssl_wrap_socket_and_match_hostname(
        sock=sock,
    ...<14 lines>...
        assert_fingerprint=self.assert_fingerprint,
    )
  File "C:\Users\Vinícius\.cargo\bin\Lib\site-packages\pip\_vendor\urllib3\connection.py", line 975, in _ssl_wrap_socket_and_match_hostname
    ssl_sock = ssl_wrap_socket(
        sock=sock,
    ...<8 lines>...
        tls_in_tls=tls_in_tls,
    )
  File "C:\Users\Vinícius\.cargo\bin\Lib\site-packages\pip\_vendor\urllib3\util\ssl_.py", line 483, in ssl_wrap_socket
    ssl_sock = _ssl_wrap_socket_impl(sock, context, tls_in_tls, server_hostname)
  File "C:\Users\Vinícius\.cargo\bin\Lib\site-packages\pip\_vendor\urllib3\util\ssl_.py", line 527, in _ssl_wrap_socket_impl
    return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
           ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Vinícius\.cargo\bin\Lib\site-packages\pip\_vendor\truststore\_api.py", line 130, in wrap_socket
    _verify_peercerts(ssl_sock, server_hostname=server_hostname)
    ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Vinícius\.cargo\bin\Lib\site-packages\pip\_vendor\truststore\_api.py", line 339, in _verify_peercerts
    _verify_peercerts_impl(
    ~~~~~~~~~~~~~~~~~~~~~~^
        sock_or_sslobj.context, cert_bytes, server_hostname=server_hostname
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "C:\Users\Vinícius\.cargo\bin\Lib\site-packages\pip\_vendor\truststore\_windows.py", line 410, in _verify_peercerts_impl
    CertCloseStore(hIntermediateCertStore, 0)
    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: wrong type

Systeminfo:

Host Name:                                LAPTOP-SAMSUNG
OS Name:                                  Microsoft Windows 11 Pro
OS Version:                               10.0.26200 N/A Build 26200
OS Manufacturer:                          Microsoft Corporation
OS Configuration:                         Standalone Workstation
OS Build Type:                            Multiprocessor Free
Registered Owner:                         Vinícius
Registered Organization:                  N/A
Product ID:                               00330-80000-00000-AA411
Original Install Date:                    4/7/2026, 9:23:11 PM
System Boot Time:                         7/13/2026, 12:38:16 PM
System Manufacturer:                      SAMSUNG ELECTRONICS CO., LTD.
System Model:                             550XDA
System Type:                              x64-based PC
Processor(s):                             1 Processor(s) Installed.
                                          [01]: Intel64 Family 6 Model 140 Stepping 1 GenuineIntel ~1805 Mhz
BIOS Version:                             American Megatrends International, LLC. P23CFB.053.241029.HQ, 10/29/2024
Windows Directory:                        C:\WINDOWS
System Directory:                         C:\WINDOWS\system32
Boot Device:                              \Device\HarddiskVolume1
System Locale:                            pt-br;Portuguese (Brazil)
Input Locale:                             pt-br;Portuguese (Brazil)
Time Zone:                                (UTC-03:00) Brasilia
Total Physical Memory:                    3,820 MB
Available Physical Memory:                418 MB
Virtual Memory: Max Size:                 10,220 MB
Virtual Memory: Available:                4,506 MB
Virtual Memory: In Use:                   5,714 MB
Page File Location(s):                    C:\pagefile.sys
Domain:                                   WORKGROUP
Logon Server:                             \\LAPTOP-SAMSUNG
Hotfix(s):                                5 Hotfix(s) Installed.
                                          [01]: KB5087051
                                          [02]: KB5054156
                                          [03]: KB5094126
                                          [04]: KB5083532
                                          [05]: KB5094135
Network Card(s):                          3 NIC(s) Installed.
                                          [01]: Intel(R) Wireless-AC 9462
                                                Connection Name: Wi-Fi
                                                DHCP Enabled:    Yes
                                                DHCP Server:     192.168.0.1
                                                IP address(es)
                                                [01]: 192.168.0.38
                                                [02]: fe80::c675:abff:fe69:a0b9
                                                [03]: 2804:2f30:fc02:da00:c675:abff:fe69:a0b9
                                          [02]: Realtek PCIe GbE Family Controller
                                                Connection Name: Ethernet
                                                Status:          Media disconnected
                                          [03]: VirtualBox Host-Only Ethernet Adapter
                                                Connection Name: Ethernet 2
                                                DHCP Enabled:    No
                                                IP address(es)
                                                [01]: 192.168.56.1
                                                [02]: fe80::800:27ff:fe00:3c
Virtualization-based security:        Status: Running
                                          Required Security Properties:
                                                DMA Protection
                                          Available Security Properties:
                                                Base Virtualization Support
                                                Secure Boot
                                                DMA Protection
                                                Secure Memory Overwrite
                                                UEFI Code Read-Only
                                                SMM Security Mitigations 1.0
                                                Mode Based Execution Control
                                                APIC Virtualization
                                          Services Configured:
                                          Services Running:
                                          App Control for Business policy: Enforced
                                          App Control for Business user mode policy: Enforced
                                          Enabled Security Features:
Hyper-V Requirements:                     A hypervisor has been detected. Features required for Hyper-V will not be displayed.

Metadata

Metadata

Labels

C-bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions