Course setup#
Getting the course content#
Download the course content from this link, and then move the file to wherever you’d like to put the courses contents, and extract it.
Installing packages#
For the course#
With pip
(simplest)#
Navigate to the directory you just extracted, and run
pip install -r requirements.txt
If you get an error message saying that pip
is not installed, or something similar, then try:
python -m pip install -r requirements.txt
or, if that fails too, replacing python
with either python3
or py
.
With conda
#
Again, navigate to the course directory, and run either:
conda install -f environment.yml
or
conda env create -f environment.yml
In this second case, later on, whenever you want to launch jupyter
, you’ll first need to do:
conda activate python-school
Install other packages (if needed)#
You can extend Python by installing several free packages. The best way to do it varies according to the operating system and the installed package manager.
Warning
We will be using system commands. If you see >>>
in the command line, it means you are inside Python interpreter and you must first exit: to do it, type exit()
and press Enter.
In what follows, to check if everything is working, you can substitute PACKAGENAME
with requests
which is a module for the web.
If you have Anaconda:
click on Windows icon in the lower left corner and search
Anaconda Prompt
. A console should appear where to insert commands, with something written likeC:\Users\David>
. (NOTE: to run commands in Anaconda, use only this special console. If you use the default Windows console (cmd), Windows, will not be able to find Python)In the console type
conda install PACKAGENAME
If you have Linux/Mac open the Terminal and give this command (--user
install in your home):
python3 -m pip install --user PACKAGENAME
Note
If you receive errors which tell you the command python3
is not found, remove the 3
after python
Note
There is also a system command pip
(or pip3
according to your system). You can directl call it with pip install --user PACKAGENAME
Instead, we install instead with commands like python3 -m pip install --user PACKAGENAME
for uniformity and to be sure to install packages for Python 3 version