Skip to content

giorgospets/ml_assignment_1

Repository files navigation

Setting Up Your Python Environment

This guide explains how to activate a virtual environment (venv) and install all the required dependencies from the requirements.txt file.

Prerequisites

  • Python installed on your system (version 3.8 or higher recommended).
  • pip (Python package installer) included with your Python installation.

Steps to Set Up

1. Create a Virtual Environment (Optional)

If you don’t already have a virtual environment set up, you can create one using the following command:

python -m venv venv

1. Activate the Virtual Environment

On Windows

To activate the virtual environment, run the following command in your terminal or command prompt:

.\venv\Scripts\activate

On Linux/MacOS

To activate the virtual environment, run the following command in your terminal:

source venv/bin/activate

Once activated, your terminal prompt will change to show the name of the active virtual environment, e.g., (venv).

3. Install Requirements

After activating the virtual environment, install the dependencies listed in requirements.txt by running:

pip install -r requirements.txt

This will ensure that all required packages are installed in the virtual environment.

4. Verify Installation

To confirm that all packages were installed correctly, you can list the installed packages:

pip list

You should see all the packages specified in requirements.txt in the output.

5. Deactivating the Virtual Environment

When you’re done working in the virtual environment, deactivate it by running:

deactivate

This will return your terminal to the global Python environment.

6. Install Jupyter Notebook

In order to use the Jupyter Notebook using the virtual enviroment, run:

python -m ipykernel install --user --name=venv

7. Start Jupyter Notebook

In order to run a Notebook, simply type:

jupyter notebook

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors