ScoopInstaller / Scoop

A command-line installer for Windows.
https://scoop.sh
Other
21.04k stars 1.4k forks source link

[Bug] Python 3.12 - 3.13 #6178

Closed mark05e closed 1 hour ago

mark05e commented 2 hours ago

Bug Report

Current Behavior

While updating Python recently, I encountered an error. It initially appeared with version 3.12 and persists even after upgrading to 3.13. I have also attempted to uninstall and reinstall the package, but the issue remains.

PS C:\Users\mark> scoop install python
Installing 'python' (3.13.0) [64bit] from 'main' bucket
Loading python-3.13.0-amd64.exe from cache
Checking hash of python-3.13.0-amd64.exe ... ok.
Running pre_install script...done.
Running installer script...done.
Linking ~\scoop\apps\python\current => ~\scoop\apps\python\3.13.0
Creating shim for 'python3'.
Creating shim for 'idle'.
Creating shim for 'idle3'.
Adding ~\scoop\apps\python\current\Scripts to your path.
Adding ~\scoop\apps\python\current to your path.
Persisting Scripts
Persisting Lib\site-packages
Running post_install script...  WARNING: Failed to write executable - trying to use .deleteme logic
ERROR: Could not install packages due to an OSError: [WinError 3] The system cannot find the path specified: 'C:\\Users\\mark\\scoop\\apps\\python\\current\\Scripts\\pip.exe' -> 'C:\\Users\\mark\\scoop\\apps\\python\\current\\Scripts\\pip.exe.deleteme'

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Users\mark\scoop\apps\python\current\Lib\ensurepip\__main__.py", line 5, in <module>
    sys.exit(ensurepip._main())
             ~~~~~~~~~~~~~~~^^
  File "C:\Users\mark\scoop\apps\python\current\Lib\ensurepip\__init__.py", line 257, in _main
    return _bootstrap(
        root=args.root,
    ...<4 lines>...
        default_pip=args.default_pip,
    )
  File "C:\Users\mark\scoop\apps\python\current\Lib\ensurepip\__init__.py", line 172, in _bootstrap
    return _run_pip([*args, "pip"], [os.fsdecode(tmp_wheel_path)])
  File "C:\Users\mark\scoop\apps\python\current\Lib\ensurepip\__init__.py", line 87, in _run_pip
    return subprocess.run(cmd, check=True).returncode
           ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
  File "C:\Users\mark\scoop\apps\python\current\Lib\subprocess.py", line 577, in run
    raise CalledProcessError(retcode, process.args,
                             output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['C:\\Users\\mark\\scoop\\apps\\python\\current\\python.exe', '-W', 'ignore::DeprecationWarning', '-c', '\nimport runpy\nimport sys\nsys.path = [\'C:\\\\Users\\\\MARK~1.ALE\\\\AppData\\\\Local\\\\Temp\\\\tmpctou5k6m\\\\pip-24.2-py3-none-any.whl\'] + sys.path\nsys.argv[1:] = [\'install\', \'--no-cache-dir\', \'--no-index\', \'--find-links\', \'C:\\\\Users\\\\MARK~1.ALE\\\\AppData\\\\Local\\\\Temp\\\\tmpctou5k6m\', \'--upgrade\', \'pip\']\nrunpy.run_module("pip", run_name="__main__", alter_sys=True)\n']' returned non-zero exit status 1.

done.
'python' (3.13.0) was installed successfully!
Notes
-----
Allow applications and third-party installers to find python by running:
"C:\Users\mark\scoop\apps\python\current\install-pep-514.reg"

Expected Behavior

No errors

Additional context/output

Possible Solution

System details

Windows version: [e.g. 7, 8, 10, 11] Windows 10 OS architecture: [e.g. 32bit, 64bit, arm64] 64bit PowerShell version: [output of "$($PSVersionTable.PSVersion)"]

Major  Minor  Patch  PreReleaseLabel BuildLabel
-----  -----  -----  --------------- ----------
7      4      5 

Additional software: [(optional) e.g. ConEmu, Git]

Scoop Configuration

//# Your configuration here
mark05e commented 2 hours ago

Researching https://github.com/pypa/pip/issues/9023

Researching https://github.com/ScoopInstaller/Main/blob/master/bucket/python.json

    "post_install": [
        "python -E -s -m ensurepip -U --default-pip | Out-Null",
        "Write-Output \"$([char]0x1b)[0m\" # Reset ansi to prevent color leak from installer"
    ],
mark05e commented 1 hour ago

I realized that this issue was raised on the incorrect repository. I am closing it now.