Virtual environments

Virtual environments#

Virtual environments create isolated and sel-contained workspaces, allowing us to manage project-specific dependencies separatedly from system-wide installation. This isollation has several benefits:

  • Avoid dependency conflicts: prevents interferences between project-specific and system-wide dependenciesm, such as common erors related to version mismatches.

  • Transparency and Open Science: Ensures that others can replicate your results and reproduce your analysis reliably.

environments

To create and activate your virtual environment, follow these steps:

  1. Navigate to the directory where you want to create the environment using the cd command in the terminal.

  2. Create the virtual environment:

     python3 -m venv <your_environment_name>
    
  3. Activate the virtual environment:

     source /path/to/environment/bin/activate
    

Want to check more extra content?

Head back to the main extra content page to explore the others!