scoopでpythonをアップデートしたときにエラーが発生…
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
PS > scoop update python python: 3.12.0 -> 3.12.1 WARN Scoop uses 'aria2c' for multi-connection downloads. WARN Should it cause issues, run 'scoop config aria2-enabled false' to disable it. WARN To disable this warning, run 'scoop config aria2-warning-enabled false'. Updating one outdated app: Updating 'python' (3.12.0 -> 3.12.1) Downloading new version Starting download with aria2 ... Download: Download Results: Download: gid |stat|avg speed |path/URI Download: ======+====+===========+======================================================= Download: 7205f8|OK | 7.0MiB/s|C:/Users/user/scoop/cache/python#3.12.1#https_www.python.org_ftp_python_3.12.1_python-3.12.1-amd64.exe_setup.exe Download: Status Legend: Download: (OK):download completed. Checking hash of python-3.12.1-amd64.exe ... ok. Uninstalling 'python' (3.12.0) Running uninstaller script... Removing shim 'python3.shim'. Removing shim 'python3.exe'. Removing shim 'idle'. Removing shim 'idle.cmd'. Removing shim 'idle3'. Removing shim 'idle3.cmd'. Unlinking ~\scoop\apps\python\current Installing 'python' (3.12.1) [64bit] from main bucket Loading python-3.12.1-amd64.exe from cache. Running pre_install script... Running installer script... Linking ~\scoop\apps\python\current => ~\scoop\apps\python\3.12.1 Creating shim for 'python3'. Creating shim for 'idle'. Creating shim for 'idle3'. 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] 指定されたパスが見つかりません。: 'C:\\Users\\user\\scoop\\apps\\python\\current\\Scripts\\pip.exe' -> 'C:\\Users\\user\\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\user\scoop\apps\python\current\Lib\ensurepip\__main__.py", line 5, in <module> sys.exit(ensurepip._main()) ^^^^^^^^^^^^^^^^^ File "C:\Users\user\scoop\apps\python\current\Lib\ensurepip\__init__.py", line 284, in _main return _bootstrap( ^^^^^^^^^^^ File "C:\Users\user\scoop\apps\python\current\Lib\ensurepip\__init__.py", line 200, in _bootstrap return _run_pip([*args, *_PACKAGE_NAMES], additional_paths) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\user\scoop\apps\python\current\Lib\ensurepip\__init__.py", line 101, in _run_pip return subprocess.run(cmd, check=True).returncode ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\user\scoop\apps\python\current\Lib\subprocess.py", line 571, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['C:\\Users\\user\\scoop\\apps\\python\\current\\python.exe', '-W', 'ignore::DeprecationWarning', '-c', '\nimport runpy\nimport sys\nsys.path = [\'C:\\\\Users\\\\Y3144~1.WAT\\\\AppData\\\\Local\\\\Temp\\\\tmp_74lff8c\\\\pip-23.2.1-py3-none-any.whl\'] + sys.path\nsys.argv[1:] = [\'install\', \'--no-cache-dir\', \'--no-index\', \'--find-links\', \'C:\\\\Users\\\\Y3144~1.WAT\\\\AppData\\\\Local\\\\Temp\\\\tmp_74lff8c\', \'--upgrade\', \'pip\']\nrunpy.run_module("pip", run_name="__main__", alter_sys=True)\n']' returned non-zero exit status 1. 'python' (3.12.1) was installed successfully! Notes ----- Allow applications and third-party installers to find python by running: "C:\Users\user\scoop\apps\python\current\install-pep-514.reg" |
pipのアップデートでエラーが発生しているようです。
権限のない場所にインストールしたときにエラーが発生している模様?
対処方法が、Pip upgrade failed #5090にあったので試してみました。
pwsh: ~\scoop\apps\python\current\python.exe -m pip install --upgrade pip --user
cmd: %userprofile%\scoop\apps\python\current\python.exe -m pip install --upgrade pip --user
1 2 3 4 5 6 7 8 9 10 11 12 |
PS > ~\scoop\apps\python\current\python.exe -m pip install --upgrade pip --user Requirement already satisfied: pip in c:\users\user\scoop\apps\python\current\lib\site-packages (22.3) Collecting pip Downloading pip-23.3.2-py3-none-any.whl (2.1 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.1/2.1 MB 8.4 MB/s eta 0:00:00 Installing collected packages: pip WARNING: The scripts pip.exe, pip3.12.exe and pip3.exe are installed in 'C:\Users\user\AppData\Roaming\Python\Python312\Scripts' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. Successfully installed pip-23.3.2 [notice] A new release of pip is available: 22.3 -> 23.3.2 [notice] To update, run: python.exe -m pip install --upgrade pip |
このコマンドでpipのアップデートはできたようです。