- executable installer 3.10.2 を実行
- 設定は下記の通り
- Optional Features
- Documentation
- pip
- tcl/tk and IDLE
- Python test suite
- py launcher
- Advanced Options
- Install for all users
- Associate files with python (requires the py launcher)
- Creates shortcuts for installed applications
- Add Python to environment variables
- Precompile standard library
- Download debugging symbols
- Download debug binaries
- Customize install location
C:\Data\Python\Python310\
- Setup was successful
- 実行: Disable path length limit Changes your machine configuration to allow programs, including Python, to bypass the 260 character "MAX_PATH" limitation.
- Optional Features
- PATH の確認
# PowerShell Get-WmiObject Win32_Environment | ?{ $_.Name -eq 'Path' } | %{ $_.VariableValue = ($_.VariableValue -replace ";","`n"); $_ } | Format-List Name,UserName,VariableValue
Name : Path UserName : <SYSTEM> VariableValue : %SystemRoot%\system32 %SystemRoot% %SystemRoot%\System32\Wbem %SYSTEMROOT%\System32\WindowsPowerShell\v1.0\ %SYSTEMROOT%\System32\OpenSSH\ Name : Path UserName : NT AUTHORITY\SYSTEM VariableValue : %USERPROFILE%\AppData\Local\Microsoft\WindowsApps Name : Path UserName : DESKTOP-WIN-02\admin VariableValue : C:\Data\Python\Python310\Scripts\ C:\Data\Python\Python310\ C:\Users\admin\AppData\Local\Programs\Python\Launcher\ %USERPROFILE%\AppData\Local\Microsoft\WindowsApps
- pip PATH 確認
# PowerShell (Get-Command pip).Path
C:\Data\Python\Python310\Scripts\pip.exe
- pip 更新
pip install -U pip
- wheel インストール
pip install wheel
- pip 以外のモジュールの一括更新
# PowerShell pip install --upgrade (@(pip list --format freeze --exclude pip) | %{$_ -Replace '==.*$',''})
- PowerShell から下記の様に実行する
pip list --outdated
のほうが良いと思っていたが、依存関係解決のためには全モジュールを指定したほうが良さそう
pip install --upgrade (@(pip list --format freeze --exclude pip) | %{$_ -Replace '==.*$',''})
- 環境変数
http_proxy
https_proxy
にhttp://<proxy server>:<port>
の形で設定する pip
だけのプロキシ設定の場合は%APPDATA%\pip\pip.ini
に下記のように設定する[global] proxy = http://<proxy server>:<port>
モジュールの一括更新は
--outdated
をつけないほうが良さそう