ดาวน์โหลดจาก python.org/downloads (32-bit / 64-bit MSI Installer)
ขั้นตอนติดตั้ง
- Run Installer ด้วย Admin Rights
- ☑ Add Python to PATH (สำคัญมาก)
- ☑ Install for all users (แนะนำ)
- เลือก Customize Installation → เลือก Features ทั้งหมด
- Advanced Options: ☑ Install for all users, ☑ Add to PATH, ☑ Precompile standard library
- Install → Close
ทดสอบ
C:\> python --version
Python 3.11.4
C:\> python
Python 3.11.4 ...
>>>> print("Hello")
Hello
>>>> exit()
หลังติดตั้ง ควรทำ
python -m pip install --upgrade pip- ติดตั้ง Editor: VS Code + Python Extension, หรือ PyCharm
- เรียนรู้ Virtual Environment:
python -m venv venv