Featured Post

Python Virtual Environments

Python Virtual Environments

If at all you start working on python, you will at some point come across python virtual environment. A virtual environment(venv) creates a silo where whatever version of packages you use will not have impact globally. In some cases you need a venv to install packages even. Below is the steps to setup python venv referenced from freecodecamp-python-venv

In your terminal to install venv to your host python

pip install virtualenv 

else use below command to install venv globally

      sudo apt install python3.11-venv 

 Install virtual environment by cd to the folder then ->

python<version> -m venv <virtual-environment-name>

 To activate the virtual environment, cd to the folder then->

      source twittervenv/bin/activate
 

No comments:

Post a Comment