Basics

Installation

Install the latest version of the Anaconda Distribution:

After you have installed Anaconda, you can update it. The following commands will update all packages in the default “base” environment to the latest version but will not update Python:

To do

Now follow the steps described in the next section.

Anaconda environment

After you have installed and updated Anaconda, you can install the modules you need for a specific lab in a new environment.

To do

Install or update Modules

Take a look at all the modules in your environment:

conda list

Make sure that you use scikit-learn in version 1.0.2 or higher. If this is not the case, update Anaconda. If you only want to update specific modules, use conda update and the name of the module (e.g., scikit-learn)

conda update scikit-learn

If you want to install new modules in your environment, you should always use conda (and not the package installer for Python: pip). Here is an example of how to install scikit-learn see conda documentation

conda install scikit-learn

Or, if you want to install a specific version

conda install scikit-learn=1.0.2

Finally, take a look at the Anaconda Cheat Sheet which provides a list of useful commands.

Miniforge

As an alternative to Anaconda, you can also use the open-source project Miniforge.

Miniforge is a small, bootstrap version of the data science platform Anaconda that includes only Python, the open source package management system conda and a small number of other useful packages.

Miniforge also uses Anaconda’s package manager conda, which makes it easy to manage multiple data environments that can be maintained and run separately without interference from each other (in so called virtual environments).

Hinweis

Miniforge is an community-led alternative to the data science platforms Anaconda and Miniconda, provided by Anaconda, Inc.

Compared to Anaconda, Miniforge provides more up-to-date packages, and is more user-friendly. Therefore, I recommend using Miniforge for data science projects.

To do

Install the latest version of the Miniforge

Visual Studio Code

Basics

Visual Studio Code (also called Code) is a powerful source code editor which runs on your desktop and is available for Windows, macOS and Linux. It comes with a rich ecosystem of extensions for Python.

Hinweis

Visual Studio Code is a code editor that can be used with a variety of programming languages including Python.



Installation

Install VS Code:

To do

Install extensions

The features that Visual Studio Code includes out-of-the-box are just the start. VS Code extensions let you add languages, debuggers, and tools to your installation to support your development workflow.

Let’s install some important extensions:

Jupyter Notebooks

We usually work with Jupyter Notebook files in VS Code:

To use a specific Anaconda environment as Jupyter kernel, select the kernel (e.g. lab) using the kernel picker in the top right of VS Code.

Optional tutorials

Some resources to get familiar with VS Code: