Python Virtual Environments

There are many different ways to run Python in a virtual environment. I have used conda (together with anaconda) s far, but I frequently end up doing work on machines that do not have it installed. Hence, I have been recently starting the "inbuilt" virtual environment. If you are working on a Python project in a directory, these are the steps to start using it:

  1. Create a new virtual environment in the current directorypython3 -m venv .
  2. "Activate" the virtual environmentsource ./bin/activate
  3. Install the packages that you need, here e.g. the logomaker packagepip3 install logomaker
  4. Run your code!python3 script_that_uses_logomaker-package.py