Computer >> บทช่วยสอนคอมพิวเตอร์ >  >> การเขียนโปรแกรม >> Python

ติดตั้ง Python บน Windows (Step by Step)

ดาวน์โหลดจาก python.org/downloads (32-bit / 64-bit MSI Installer)

ขั้นตอนติดตั้ง

  1. Run Installer ด้วย Admin Rights
  2. ☑ Add Python to PATH (สำคัญมาก)
  3. ☑ Install for all users (แนะนำ)
  4. เลือก Customize Installation → เลือก Features ทั้งหมด
  5. Advanced Options: ☑ Install for all users, ☑ Add to PATH, ☑ Precompile standard library
  6. 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