22
Introduktion
Lerking edited this page 2025-03-20 11:14:21 +01:00

Python introduktion

I denne lektion, vil vi fokusere på installation af Python.
Alle bør køre nyeste version pt. 3.13

  1. Download og installér Python.
  2. Installation af moduler.
  3. Valg af kodeeditor.

Installation af python

Seneste version af Python hentes på https://www.python.org/downloads

Herunder, vises installationsprocessen for Windows.
Installation-1

  1. Hak de 2 nederste felter af.
  2. Klik på 'Install Now' - Dette vil inkludere IDLE, som er standard python editor.

Installation-2 Installation-3
Tryk 'Close'
Installationen er nu færdig.

Verificér installation

I Windows Start menu kan man nu finde sin Python installation.

Python menu

Valg af kode editor

Der findes adskillige kode editorer, med hver deres styrker og svagheder.

Gratis editorer

  • IDLE (installeret sammen med Python)
  • PyCharm (Community edition)
  • Spyder
  • Visual Studio Code (VSCode)
    Derudover, kan man bruge en helt almindelig teksteditor, da python filer bare er tekstfiler.
  • Notepad (Simpel teksteditor)
  • Notepad++ (Teksteditor, med mulighed for syntax highlighting)

Min egen favorit er VSCode, fra Microsoft.
Den kan hentes her https://code.visualstudio.com/download

Vælger man at installere VSCode, bør man som minimum også installere følegede plugins.

  • Python (Microsoft plugin)
  • Python Debugger (Microsoft plugin)