START HERE
Your first
working window.
Set up the environment, run three small checks, then start Module 0.
1. Get the tools and code
Install 64-bit Python 3.13 for the book’s Windows setup. Use PyCharm as described in the book, or another editor. Download and extract the full companion ZIP before running files.
Open the extracted Matrix_Thinking-main folder as your project. Keep the resource folders with the programs.
2. Use a project environment
In PyCharm, select a project-specific virtual environment using Python 3.13. In its terminal, from the repository root, install:
python -m pip install -r getting_started/requirements.txtWindows terminal alternative
From the extracted repository folder:
py -3.13 -m venv .venv
.venv\Scripts\python.exe -m pip install -r getting_started/requirements.txt
.venv\Scripts\python.exe getting_started/hello.py
.venv\Scripts\python.exe getting_started/check_libraries.py
.venv\Scripts\python.exe getting_started/check_window.pyCalling the environment’s Python directly avoids changing PowerShell activation policies.
macOS / Linux terminal alternative
With Python 3.13 installed, from the extracted repository folder:
python3.13 -m venv .venv
.venv/bin/python -m pip install -r getting_started/requirements.txt
.venv/bin/python getting_started/hello.py
.venv/bin/python getting_started/check_libraries.py
.venv/bin/python getting_started/check_window.pyThe book’s installation screenshots show Windows.
3. Run the checks in order
hello.pyprints a greeting,5, and the literal text2 + 3.check_libraries.pychecks the imports.check_window.pyprints a 2×3 array and opens a blue window. Close the window to finish.
In PyCharm, open each file in getting_started/ and run it with the project interpreter.
If something goes wrong
- ModuleNotFoundError
- Install the requirements into the same interpreter that runs your file. Use that interpreter’s
-m pip. - Python cannot be found
- On Windows, check
py -3.13 --version. In PyCharm, select the interpreter explicitly. - A resource is missing
- Extract the whole repository. Follow the module README’s working directory and launch command.
4. Follow the modules
Run each listing separately. Steps are complete intermediate programs, not fragments to concatenate. Try exercises before reading their solutions.
Explore modules 0–23 →Official references: Python virtual environments · NumPy installation · Pygame setup