WindowsにPython環境を作る
WindowsにPython環境を作る、どうやれば良い?
Microsoft Storeから「python」で検索、
現時点では3つ候補が出てくる。
・Python 3.13
・Python 3.12
・Python Install Manager
Python 3.13、3.12は何となくわかるが、Python Install Managerって何者?
以下記事によると、Python Install Managerを使うことが推薦、とのこと。
※
Windows版のPythonのインストール方法が大きく変わる Python Install Managerが登場
Python Install Managerを使うと複数のバージョンのPytyonを管理できるっぽい。
ということでMicrosoft Storeより「Pytyon Install Manager」をインストールした。
途中でWindows Terminalが開き何やら処理が始まるが・・
どうやら旧バージョンのPython(pyコマンド)を入れてたらしい。
Welcome to the Python installation manager configuration helper.
********************************************************************************
Windows is not configured to allow paths longer than 260 characters.
Python and some other apps can exceed this limit, but it requires changing a
system-wide setting, which may need an administrator to approve, and will
require a reboot. Some packages may fail to install without long path support
enabled.
Update setting now? [y/N] y
The setting has been successfully updated, and will take effect after the next reboot.
********************************************************************************
The legacy 'py' command is still installed.
This may interfere with launching the new 'py' command, and may be resolved by
uninstalling 'Python launcher'.
Open Installed apps now? [y/N]
[y]を入力しインストールされているアプリ一覧画面を開いたら
・Python 3.12.3(64-bit)
・Python Launcher
を2024年ごろにインストールしてたっぽいのでアンインストール
これで良いのかわからないが先進める。
Configuring this enables commands like python3.14.exe to run from your
terminal, but is not needed for the python or py commands (for example, py
-V:3.14).
We can add the directory (C:\Users\masat\AppData\Local\Python\bin) to PATH now,
but you will need to restart your terminal to use it. The entry will be removed
if you run py uninstall --purge, or else you can remove it manually when
uninstalling Python.
Add commands directory to your PATH now? [y/N]
とりあえず [y] でパスには追加。
You do not have the latest Python runtime.
Install the current latest version of CPython? If not, you can use 'py install
default' later to install.
Install CPython now? [Y/n]
最新のPytyonがインストールされていないのでCPythonをインストールするか?だと。
CPytyonって何?
Python = CPython (C言語で記述したPytyon) っぽい。なので[y]でインストールする。
次にオンラインヘルプを表示するか聞いてきた。いらないので[N]
View online help? [y/N]
これでインストールできた?
Python