Materials to brush up your Python skills
You will need to set up by yourself the following pieces:
Download and install Visual Studio Code.
If you already have Visual Studio Code, install the latest version.
the pixi
tool: you will get installation instructions here.
For Windows, follow the “PowerShell” instructions (look for a PowerShell on your system, it’s there I promise.)
For those who already know a little, pixi
is a minimal tool providing environments similar to Anaconda, but we will not use Anaconda;
(base)
:conda config --set auto_activate_base false
understand that you will need a terminal for cloning learning materials, installing dependencies and more.
You are expected to be familiar with the most basic shell commands to list a directory, create and move files, change permissions, etc.
the git
(or git.exe
for Windows users) program, for version control.
Using Git falls out of scope of this seminar, but you are strongly encouraged to become proficient with it.
You may find resources on GitHub Learning Lab, e.g. the following course for first-timers.
Try running git --version
. If necessary, install git
:
Operating system | Installation command |
---|---|
Linux (Ubuntu) | sudo apt install git |
MacOS (preferred) | brew install git |
Windows or MacOS | pixi global install git |
clone the resources for the seminar:
git clone https://github.com/xoolive/pyclass
You may move the folder at any time if you prefer to keep things sorted differently on your computer.
Before each session, it may be necessary to update the repository and get additional resources with fixes if errors were encountered in previous sessions. You should add the following options in order to avoid merging conflicts:
git pull --rebase --autostash
With Visual Studio Code, open the pyclass.code-workspace
file:
Initialize the pixi interpreter. Open a terminal (Terminal > New Terminal), then
pixi run python
Open a Python file, e.g. python/numpy_demo.py
, wait and look at the Python version down:
Select the pixi interpreter:
If you can’t see it, refresh the interpreter list:
Confirm you have the new Python version: