Python & Virtual Environments - Miniconda

Why do we need Virtual Environments?
 

Django projects depend on multiple programs to run.
The most obvious one is Django itself.
 

If you created a project in 2005,
it would have a version Django 0.9,
and it would run on python 2.3.


20 years later we create a project,
that could run on Django 5.2,
and with python 3.10.





For this reason we create virtual environments.
Each project has its own virtual environment.
Each virtual environment has its own dependencies.



 

Creating a Virtual Environment with Miniconda

 

  1. Installing Miniconda: https://www.anaconda.com/download/success
     
  2. Creating Virtual environments
    conda create -n jaimedcsilva python==3.10
    
    In this example, we create a Virtual Environment named jaimedcsilva that will have Python 3.10 installed.
    Note: You will be asked if you want to install additional packages. Choose yes as these packages will be useful in the future.
     
  3. Activating the Virtual Environment  
    activate jaimedcsilva
    You know that the Virtual Environment is activated when it shows between parentheses in your directory: (jaimedcsilva) C:\Users\jaime>

 

 

 

Other useful Miniconda commands 

 

Deactivating a Virtual Environment

conda deactivate



Removing a Virtual Environment(permanently)

conda remove -n jaimedcsilva --all



Listing all the existent Virtual Environments

conda info --envs


 




04 June 2025 | Last Updated: 22 Nov. 2025 | jaimedcsilva

Related
  • Python & Virtual Environments - Miniconda
  • Choosing a Text Editor for Django Web Development
  • The Lifecycle of a Web Project
  • Client-Server Architecture

  • Buy Me a Coffee