Windows

Installatie-instructies voor Python onder Windows.

Python

Download en gebruik de Windows x86-64 executable installer voor Python 3.7.2 64-bit (zie Python Releases for Windows).

In de installer, vink “Add Python 3.7 to PATH” aan.

Test

Open een Windows commando-venster met Win-R, cmd, en controlleer de Python-versie:

> python -V
Python 3.7.2

Test

Open IDLE vanuit het Start-menu: “IDLE (Python 3.7 64 bit)”. Dit toont de “Python 3.7.2 Shell”.

Meer uitleg is te vinden in Installatie-instructies [Installatie Python.docx].

pygame

Maak een virtuele omgeving aan:

> mkdir CoderDojo
CoderDojo> cd CoderDojo
CoderDojo> python -m venv venv37

Gebruik de aangemaakte virtuele omgeving:

CoderDojo> venv37\Scripts\activate
(venv37) CoderDojo>

Update pip:

(venv37) CoderDojo> python -m pip install --upgrade pip

Installeer pygame m.b.v. pip:

(venv37) CoderDojo> pip install -U pygame

Test

(venv37) CoderDojo> python -m pygame.examples.aliens

Meer uitleg is te vinden in Pygame Installation.

IPython

Installeer IPython (onderdeel van Jupyter) m.b.v. pip:

(venv37) CoderDojo> pip install jupyter

Test

(venv37) CoderDojo> ipython -V
7.3.0

(venv37) CoderDojo> ipython
Python 3.7.2 (tags/v3.7.2:9a3ffc0492, Dec 23 2018, 23:09:28) [MSC v.1916 64 bit (AMD64)]
Type 'copyright', 'credits' or 'license' for more information
IPython 7.3.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: print("Hi!")
Hi!

In [2]: 2 + 2
Out[2]: 4

In [3]:

Sluit IPython met Ctrl-D.

Kivy

Kivy heb je enkel nodig voor de Extra oefeningen.

Installeer Kivy m.b.v. pip:

(venv37) CoderDojo> python -m pip install --upgrade pip wheel setuptools
(venv37) CoderDojo> python -m pip install docutils pygments pypiwin32 kivy.deps.sdl2 kivy.deps.glew
(venv37) CoderDojo> python -m pip install kivy.deps.gstreamer
(venv37) CoderDojo> python -m pip install kivy

Test

(venv37) CoderDojo> python
Python 3.7.2 (tags/v3.7.2:9a3ffc0492, Dec 23 2018, 23:09:28) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import kivy
[INFO   ] [Logger      ] Record log in C:\Users\P\.kivy\logs\kivy_19-03-18_1.txt
[INFO   ] [Kivy        ] v1.10.1
[INFO   ] [Python      ] v3.7.2 (tags/v3.7.2:9a3ffc0492, Dec 23 2018, 23:09:28) [MSC v.1916 64 bit (AMD64)]

Meer uitleg is te vinden in Kivy Installation on Windows.