Skip to content

rustpython --install-pip isn't working on Windows 11 25H2. #8246

Description

@CVFA1

RustPython is failing to install pip on Windows 11 25H2.

Microsoft Windows [version 10.0.26200.8655]
(c) Microsoft Corporation. All rights reserved.

C:\Users\Vinícius>rustpython --install-pip
ERROR: Exception:
Traceback (most recent call last):
  File "C:\Users\VINCIU~1\AppData\Local\Temp\tmpk48yy3ec\pip-26.1.2-py3-none-any.whl\pip\_internal\cli\base_command.py", line 109, in _run_wrapper
    status = _inner_run()
  File "C:\Users\VINCIU~1\AppData\Local\Temp\tmpk48yy3ec\pip-26.1.2-py3-none-any.whl\pip\_internal\cli\base_command.py", line 102, in _inner_run
    return self.run(options, args)
           ~~~~~~~~^^^^^^^^^^^^^^^
  File "C:\Users\VINCIU~1\AppData\Local\Temp\tmpk48yy3ec\pip-26.1.2-py3-none-any.whl\pip\_internal\cli\req_command.py", line 101, in wrapper
    return func(self, options, args)
  File "C:\Users\VINCIU~1\AppData\Local\Temp\tmpk48yy3ec\pip-26.1.2-py3-none-any.whl\pip\_internal\commands\install.py", line 399, in run
    options.use_user_site = decide_user_install(
                            ~~~~~~~~~~~~~~~~~~~^
        options.use_user_site,
        ^^^^^^^^^^^^^^^^^^^^^^
    ...<3 lines>...
        isolated_mode=options.isolated_mode,
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "C:\Users\VINCIU~1\AppData\Local\Temp\tmpk48yy3ec\pip-26.1.2-py3-none-any.whl\pip\_internal\commands\install.py", line 828, in decide_user_install
    if site_packages_writable(root=root_path, isolated=isolated_mode):
       ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\VINCIU~1\AppData\Local\Temp\tmpk48yy3ec\pip-26.1.2-py3-none-any.whl\pip\_internal\commands\install.py", line 764, in site_packages_writable
    return all(
           ^^^
  File "C:\Users\VINCIU~1\AppData\Local\Temp\tmpk48yy3ec\pip-26.1.2-py3-none-any.whl\pip\_internal\commands\install.py", line 765, in <genexpr>
    test_writable_dir(d)
    ~~~~~~~~~~~~~~~~~^^^
  File "C:\Users\VINCIU~1\AppData\Local\Temp\tmpk48yy3ec\pip-26.1.2-py3-none-any.whl\pip\_internal\utils\filesystem.py", line 91, in test_writable_dir
    return _test_writable_dir_win(path)
  File "C:\Users\VINCIU~1\AppData\Local\Temp\tmpk48yy3ec\pip-26.1.2-py3-none-any.whl\pip\_internal\utils\filesystem.py", line 103, in _test_writable_dir_win
    fd = os.open(file, os.O_RDWR | os.O_CREAT | os.O_EXCL)
OSError: [Errno 22] Invalid argument: 'C:\\accesstest_deleteme_fishfingers_custard_opkdw2'
Traceback (most recent call last):
  File "C:\Users\Vinícius\.cargo\git\checkouts\rustpython-63090cdce5e18442\5c36d5c\Lib\runpy.py", line 203, in _run_module_as_main
    return _run_code(code, main_globals, None,
                     "__main__", mod_spec)
  File "C:\Users\Vinícius\.cargo\git\checkouts\rustpython-63090cdce5e18442\5c36d5c\Lib\runpy.py", line 88, in _run_code
    exec(code, run_globals)
    ~~~~^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Vinícius\.cargo\git\checkouts\rustpython-63090cdce5e18442\5c36d5c\Lib\ensurepip\__main__.py", line 5, in <module>
    sys.exit(ensurepip._main())
             ~~~~~~~~~~~~~~~^^
  File "C:\Users\Vinícius\.cargo\git\checkouts\rustpython-63090cdce5e18442\5c36d5c\Lib\ensurepip\__init__.py", line 258, in _main
    return _bootstrap(
        root=args.root,
    ...<4 lines>...
        default_pip=args.default_pip,
    )
  File "C:\Users\Vinícius\.cargo\git\checkouts\rustpython-63090cdce5e18442\5c36d5c\Lib\ensurepip\__init__.py", line 173, in _bootstrap
    return _run_pip([*args, "pip"], [os.fsdecode(tmp_wheel_path)])
  File "C:\Users\Vinícius\.cargo\git\checkouts\rustpython-63090cdce5e18442\5c36d5c\Lib\ensurepip\__init__.py", line 88, in _run_pip
    return subprocess.run(cmd, check=True).returncode
           ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
  File "C:\Users\Vinícius\.cargo\git\checkouts\rustpython-63090cdce5e18442\5c36d5c\Lib\subprocess.py", line 578, in run
    raise CalledProcessError(retcode, process.args,
                             output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['C:\\Users\\Vinícius\\.cargo\\bin\\rustpython.exe', '-W', 'ignore::DeprecationWarning', '-c', '\nimport runpy\nimport sys\nsys.path = [\'C:\\\\Users\\\\VINCIU~1\\\\AppData\\\\Local\\\\Temp\\\\tmpk48yy3ec\\\\pip-26.1.2-py3-none-any.whl\'] + sys.path\nsys.argv[1:] = [\'install\', \'--no-cache-dir\', \'--no-index\', \'--find-links\', \'C:\\\\Users\\\\VINCIU~1\\\\AppData\\\\Local\\\\Temp\\\\tmpk48yy3ec\', \'--upgrade\', \'pip\']\nrunpy.run_module("pip", run_name="__main__", alter_sys=True)\n']' returned non-zero exit status 2.

Information from systeminfo (if it helps):

Host Name:                                 LAPTOP-SAMSUNG
OS Name:                                   Microsoft Windows 11 Pro
OS Version:                                10.0.26200 N/A Build 26200
OS Manufacturer:                           Microsoft Corporation
System 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:                     04/07/2026, 21:23:11
System Boot Time:                          08/07/2026, 21:21:58
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, 29/10/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) Brasília
Total Physical Memory:                     3,820 MB
Available Physical Memory:                 430 MB
Virtual Memory: Max Size:                  8,428 MB
Virtual Memory: Available:                 1,449 MB
Virtual Memory: In Use:                    6,979 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):                           2 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
Virtualization-based security:             Status: Running
                                           Required Security Properties:
                                                 DMA Protection
                                           Available Security Properties:
                                                 Base Virtualization Support
                                                 Secure Boot
                                                 DMA Protection
                                                 Secure Memory Overwrite
                                                 Read-Only UEFI Code
                                                 SMM Security Mitigations 1.0
                                                 Mode-based Execution Control
                                                 APIC Virtualization
                                           Services Configured:
                                                 Hypervisor Enforced Code Integrity
                                                 Hardware Enforced Stack Protection in Kernel Mode
                                           Services Running:
                                                 Hypervisor Enforced Code Integrity
                                                 Hardware Enforced Stack Protection in Kernel Mode
                                           App Control for Business policy: Enforced
                                           App Control for Business user mode policy: Disabled
                                           Security Features Enabled:
Hyper-V Requirements:                      A hypervisor has been detected. Features required for Hyper-V will not be displayed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions