To effectively work through the concepts and examples in this course, you'll need a working Python environment equipped with a few standard libraries widely used in data science and machine learning. Python has become the de facto language for these fields due to its readability, extensive libraries, and supportive community. This section guides you through setting up the necessary tools.
We strongly recommend using the Anaconda Distribution or its lighter version, Miniconda. Anaconda bundles Python with many popular data science packages and includes conda
, a powerful package and environment manager. Using conda
helps manage dependencies and isolates your project environments, preventing conflicts between different projects that might require different versions of the same library. This is much preferred over installing packages directly into your system's base Python installation.
conda init
. It's generally recommended to say "yes" to make conda
readily available in your terminal. On Windows, Anaconda Prompt will be added to your Start Menu.conda --version
. If the installation was successful, it should print the installed conda version.While Anaconda installs many packages by default, the core libraries we'll rely on heavily throughout this course are:
If you installed Miniconda, or if for some reason these libraries aren't present in your Anaconda installation, you can install them using the conda
command in your terminal or Anaconda Prompt:
conda install numpy pandas matplotlib seaborn jupyterlab
Conda will determine the compatible versions of these packages and their dependencies and ask for your confirmation before installing them.
Once the libraries are installed, you can start the JupyterLab environment. Open your terminal or Anaconda Prompt, navigate to the directory where you want to store your course files (you can use commands like cd path/to/your/directory
), and then run:
jupyter lab
This command should open a new tab in your web browser displaying the JupyterLab interface. From here, you can create new notebooks (.ipynb
files), write and execute Python code in cells, add explanatory text using Markdown, and see results and visualizations directly within the notebook. This interactive environment is perfect for the hands-on exercises in this course.
To confirm that the essential libraries are installed correctly, create a new Jupyter notebook and run the following code in a cell:
import numpy as np
import pandas as pd
import matplotlib as mpl
import seaborn as sns
print(f"NumPy version: {np.__version__}")
print(f"Pandas version: {pd.__version__}")
print(f"Matplotlib version: {mpl.__version__}")
print(f"Seaborn version: {sns.__version__}")
If the code runs without errors and prints the version numbers for each library, your environment is ready. You now have the necessary tools to start loading data and performing the statistical analyses we'll cover in the upcoming chapters.
© 2025 ApX Machine Learning