Integrated Development Environments (IDEs)¶
The teaching contents on this website build on so-called Application Programming Inferaces (APIs) and Integrated Development Environments (IDEs). An API represents a computing interface that enables interactions between multiple software intermediaries. Modular programming becomes easy with an API, because it systematically hides complex information that is not necessarily needed to write code according to industry standards. For instance, an API can define the interface between an application (such as Python or Word) and an Operating System (OS) such as Windows, Linux, or macOS. An IDE enables the definition of a project to use for example a specific Python Conda Environment and it enables robust coding by pointing out issues directly in the code, even before it was executed once. Powerful IDEs go even further and provide assistance in documenting code with markdown (.md files) and direct pipes into git (see section on the usage of git).
Note
These pages are written with the web-based IDE JupyterLab, which is suitable to follow the course contents. IDEs such as PyCharm or Spyder are more suitable to setup projects locally (e.g., for course assignments).
Anaconda¶
Miniconda¶
Anaconda may create large environments that require several gigabytes of storage. To install lightweight environments, use Miniconda. Miniconda does not include Anaconda Navigator and to enable working with Jupyter notebooks (in Windows):
Click on Start.
Type
Anaconda Prompt
and hit enter (use Miniconda3). A Terminal window (black background) opens.In Anaconda prompt type
conda install jupyter
and confirm withy
when the Terminal asksProceed ([y]/n)?
.
To work with Jupyter notebooks (open, create or modify), type jupyter lab
(or jupyter notebook
) in Anaconda Prompt (Miniconda3) and hit Enter. The JupyterLab application will open in the default webbrowser.
JupyterLab¶
Via Anaconda Prompt¶
Open Anaconda Prompt, which represents a Terminal window with black background and a blinking cursor.
If you are working with Miniconda, install the Jupyter Notebook app by typing conda install jupyter
and confirm with y
when Anaconda Prompt asks Proceed ([y]/n)?
.
To start the JupyterLab app and open, create, or modify Jupyter notebooks, type jupyter lab
(jupyter notebook
for Jupyter Notebook) in Anaconda Prompt (Miniconda3) and hit Enter. The Jupyter Notebook application will open in the default webbrowser.
Extensions and spellchecker¶
Many additional features for JupyterLab are available through nbextensions, which can be installed through Anaconda Prompt:
conda install -c conda-forge jupyter_contrib_nbextensions
When reading through the Python tutorials on this website, you will probably find one or another spelling mistake (please report mistakes!). In particular, the Python pages are affected, because they were created with Jupyter Lab, where there is no spell checker pre-installed. To avoid at least the most unpleasant errors you can install a spellchecker in jupyter. One solution is to install @ijmbbarrs spellchecker, which requires installing nodejs (through Anaconda Prompt and in addition to nbextensions):
conda install -c conda-forge nodejs
jupyter labextension install @ijmbarr/jupyterlab_spellchecker
The spellchecker uses Typo.js as dictionary and only identifies misspelled words without proposing corrections. More details on spellchecking are available at the developer’s website.
In the case that several warning messages occur when starting JupyterLab (such as [W 18:49:22.283 NotebookApp] Config option template_path not recognized by LenvsHTMLExporter. Did you mean one of: template_file, template_name, template_paths?
), downgrade jupyter notebook from version 6.x to 5.6.1 (there is currently an issue with the temp_path
variable):
conda install "nbconvert=5.6.1"