- æ´æ°ã®å¿ è¦æç¡ã確èª
- winget
- æ´æ°
- ãã¼ã¸ã§ã³ã®åºå®
- ãã¾ãï¼ã¤ã³ã¹ãã¼ã«ã®ãããå
- åè
Windows ç°å¢ã§ Python ãæ´æ°ããã¨ãã®æµããè¨é²ãã¾ããã
æ´æ°ã®å¿ è¦æç¡ã確èª
ã¨ãããããããã©ã«ãã® Windows ç°å¢ã§ Python ã®ãã§ãã¯æ¹æ³ãè¨é²ãã¾ããã³ãã³ãããã³ãããéãã¦ããã¼ã¸ã§ã³ããã§ãã¯ããã
python -V
ããã§ãpython3- Vãã¨ããã³ãã³ããç´¹ä»ããã¦ãããã¨ãããã¾ããWindows ç°å¢ã§ã¯ Python 3.X ãã¤ã³ã¹ãã¼ã«ãã㨠python
ã³ãã³ããå²ãå½ã¦ãããã¿ããã§ããpython3 ã¯èªåçã«å²ãå½ã¦ãããªããã¨ãããã¾ãã
èªåã®ç°å¢ã§ã¯ä»¥ä¸ã®ããã«ãªã£ã¦ãã¾ãããWindows Store App ã® Python ã ãã ã¨ãã³ãã³ãããã³ããã§ãpython3 -Vããå ¥ããã¨ãã«ãPythonããè¿ã£ã¦ããç¶æ ã«ãªãã¿ããã§ãã
where python3 > C:\Users\#user-name#\AppData\Local\Microsoft\WindowsApps\python3.exe
where python > C:\Users\#user-name#\AppData\Local\Programs\Python\Python312\python.exe > C:\Users\#user-name#\AppData\Local\Microsoft\WindowsApps\python.exe
py -0p -V:3.12 * C:\Users\#user-name#\AppData\Local\Programs\Python\Python312\python.exe
ã³ãã³ã | python ãã¼ã¸ã§ã³ | 説æ |
---|---|---|
python | ç°å¢ä¾å (3.X or 2.X) | ããã©ã«ãã® python ãå®è¡ |
python3 | 3.X | Python 3.X ãæ示çã«å®è¡ï¼ä¸»ã« Linux ç¨ï¼ |
py | ææ°ã® python | ãã¼ã¸ã§ã³ç®¡çãå¯è½ (主㫠Windows ç¨) |
ãªãã§ãWindows ç°å¢ã§ã¯ py
ã³ãã³ãã python3
ã³ãã³ãã¿ãããªãã®ãªã®ã§ã便å©ã ã¨æãã¾ããã¨ã¯ããããã¼ã¸ã§ã³æ´æ°ã¾ã§ãã¦ãããããã§ã¯ãªãã
ä¸è¬çã«ã¯ãããã¯ãå½¹å²ãéããããã¨ãããã¨ã«ãªãã®ã§ããã¯ããããã±ã¼ã¸ããã¼ã¸ã£ãã«é ¼ãå¿ è¦ãããã¾ããããããWindows ã¯ããã©ã«ãã ã¨ããã±ã¼ã¸ããã¼ã¸ã£ã®ç¨æããªãï¼ã¯ããªï¼ã®ã§ãçµå±ããã¥ã¢ã«ã§ HP ãããã¦ã³ãã¼ããã¦ã¢ãããã¼ããããã¨ã«ãªãâ¦â¦ã®ã§ãããä»åã¯ãwingetããå©ç¨ãã¦ã¢ãããã¼ãããä¾ã示ãã¾ãã
winget
ãããåã¾ã§ã¯ windows ç°å¢ã§ããã±ã¼ã¸ããã¼ã¸ã£ã¼ããããã¨ããã¨ãµã¼ããã¼ãã£ã® Chocolatey ã Scoop ãå©ç¨ãããã¨ã«ãªã£ãã¨æãã¾ãã
winget 㯠microsoft ãæä¾ãã¦ããããã±ã¼ã¸ããã¼ã¸ã£ã¼ã§ãå¾ã ã«ä½¿ãããããã«ãªã£ã¦ãã¦ããã¨æãã¾ãã
winget ã®ãã¼ã¸ã§ã³ç¢ºèªã¯ã以ä¸ã®ã©ã¡ããã®ã³ãã³ããã³ãã³ãããã³ããã§å®è¡ãã¦ãã ãããããããã¤ã³ã¹ãã¼ã«ããã¦ããªãã£ãããWindows Store ããã¤ã³ã¹ãã¼ã«ãã¾ããWindows Store ã¢ããªã§ããã°ãwinget æ¬ä½ã®ãã¼ã¸ã§ã³ç®¡çã¯èªåçã«æ´æ°ãããããã«ãªãã¯ããªã®ã§ã楽ãã§ãã
winget winget -info
ã³ãã³ãï¼
ã³ãã³ã | 説æ |
---|---|
install | æå®ãããããã±ã¼ã¸ãã¤ã³ã¹ãã¼ã« |
show | ããã±ã¼ã¸ã«é¢ããæ å ±ã表示ãã¾ã |
source | ããã±ã¼ã¸ã®ã½ã¼ã¹ã®ç®¡ç |
search | ã¢ããªã®åºæ¬æ å ±ãè¦ã¤ãã¦è¡¨ç¤º |
list | ã¤ã³ã¹ãã¼ã«æ¸ã¿ããã±ã¼ã¸ã表示ãã |
upgrade | å©ç¨å¯è½ãªã¢ããã°ã¬ã¼ãã®è¡¨ç¤ºã¨å®è¡ |
uninstall | æå®ãããããã±ã¼ã¸ãã¢ã³ã¤ã³ã¹ãã¼ã« |
hash | ã¤ã³ã¹ãã¼ã©ã¼ ãã¡ã¤ã«ãããã·ã¥ãããã«ãã¼ |
validate | ãããã§ã¹ã ãã¡ã¤ã«ãæ¤è¨¼ |
settings | è¨å®ãéããã管çè è¨å®ãè¨å®ãã |
features | 試é¨çãªæ©è½ã®ç¶æ ã表示 |
export | ã¤ã³ã¹ãã¼ã«ããã¦ããããã±ã¼ã¸ã®ãªã¹ããã¨ã¯ã¹ãã¼ã |
import | ãã¡ã¤ã«ä¸ã®ãã¹ã¦ã®ããã±ã¼ã¸ãã¤ã³ã¹ãã¼ã« |
pin | ããã±ã¼ã¸ ãã³ã®ç®¡ç |
configure | ã·ã¹ãã ãé©åãªç¶æ ã«æ§æãã¾ã |
download | æå®ãããããã±ã¼ã¸ããã¤ã³ã¹ãã¼ã©ããã¦ã³ãã¼ããã |
repair | é¸æããããã±ã¼ã¸ã修復ãã¾ã |
ãªãã·ã§ã³ï¼
ãªãã·ã§ã³ | 説æ |
---|---|
-v,--version | ãã¼ã«ã®ãã¼ã¸ã§ã³ã表示 |
--info | ãã¼ã«ã®ä¸è¬æ å ±ã表示 |
-?,--help | é¸æããã³ãã³ãã«é¢ãããã«ãã表示 |
--wait | çµäºããåã«ä»»æã®ãã¼ãæ¼ãããã³ãããã¦ã¼ã¶ã¼ã«è¡¨ç¤º |
--logs,--open-logs | æ¢å®ã®ãã°ã®å ´æãéã |
--verbose,--verbose-logs | WinGet ã®è©³ç´°ãã°ãæå¹ã«ãã |
--nowarn,--ignore-warnings | è¦ååºåãé表示ã«ãã |
--disable-interactivity | 対話åããã³ãããç¡å¹ã«ãã¾ã |
--proxy | ãã®å®è¡ã«ä½¿ç¨ãããããã·ãè¨å® |
--no-proxy | ãã®å®è¡ã«å¯¾ãããããã·ã®ä½¿ç¨ãç¡å¹ã«ãã |
æ´æ°
winget upgrade --all winget upgrade --all --silent
ååã¯ãµã¤ã¬ã³ãã«ããªãã¦ãããããã¨æãã¾ãããµã¤ã¬ã³ãå®è¡ãããã¨ã管çè 権éãå¿ è¦ã«ãªãå ´åããã£ã¦ãã®ã¨ã㯠Powershell ã®ç®¡çè ã¢ã¼ãã§å®è¡ããã¨ããã
ãµã¤ã¬ã³ãã«ãã¦ããªãå ´åã¯ãåã½ããã¦ã§ã¢ã®ãããã¢ããã表示ãããã®ã§ãéªéã«æããããããªããã©ååã¯ãããããã®ã»ããå®å ¨ãããªãããªãã¨ããæè¦ã§ãã
ãã㧠python ãã¾ã¨ãã¦ã¢ãããã¼ãã§ãããæ£ç´ãã¢ãããã¼ããããªãå端ãªãã¼ã¸ã§ã³ã許ããªãã»ããããã¨æãèãã§ããã¼ã¸ã§ã³ãåºå®ãããã¨ãã¯ãä¸è¨ã® pin
ã§ãããããåºå®ãã¦ããã¦ãä»ã¯ --all ã§ãã¹ã¦æ´æ°ãããã¨æã£ã¦ãã¾ãã
ã©ããã¦ãåå¥ã«ããããã¨ã㯠python ãä¾ã«æããã¨ãæåã« list 㧠ID ã確èªãã¾ãã
winget list python
確èªã§ãã ID ã«å¯¾ã㦠upgrade
ãå®è¡ããã
winget upgrade --id Python.Python.3
念ã®ãããæå¾ã«ã³ãã³ãããã³ããã§ãã¼ã¸ã§ã³ãå¤ãã£ã¦ãããã©ããããã§ãã¯ãã¦ãããã
python -V
ãã¼ã¸ã§ã³ã®åºå®
ã¢ãããã¼ãããªãããã±ã¼ã¸ã¯ pin
ã使ã£ã¦ãã¼ã¸ã§ã³ãåºå®ãã¾ãã
winget pin add <package>
ãããã¦ãã㨠upgrage --all ã¨ãã£ãã¢ãããã¼ãã®å¯¾è±¡å¤ã«ãªããpin
ã«è¿½å ããä¸è¦§ã確èªãããã¨ãã¯ä»¥ä¸ã
winget pin list
ã³ãã³ã | 説æ |
---|---|
add | æ°ãã PIN ã追å ãã |
remove | ããã±ã¼ã¸ PIN ã®åé¤ |
list | ç¾å¨ã®ãã³ãä¸è¦§è¡¨ç¤ºãã |
reset | PIN ããªã»ãã |
ãã¾ãï¼ã¤ã³ã¹ãã¼ã«ã®ãããå
winget ã§ç®¡çã§ããã¢ããªã¯ãwinget.runãã§æ¢ãã
ç°¡å㪠.bat
ãã¡ã¤ã«ãä½æãããã¨ã§ãã½ããã¦ã§ã¢ã®ã¤ã³ã¹ãã¼ã«ç¶æ
ãã¾ã¨ãããã¨ãå¯è½ãªã®ã§ä¾¿å©ã ã¨æãã¾ãã
echo off winget install -e --id RARLab.WinRAR winget install -e --id Google.Chrome winget install -e --id Google.Drive winget install -e --id OBSProject.OBSStudio winget install -e --id Dropbox.Dropbox winget install -e --id Greenshot.Greenshot winget install -e --id Notion.Notion winget install -e --id KeePassXCTeam.KeePassXC echo on