Setting up Python Virtual Environment

This is a note to myself on how to setup a Python virtual environment using Anaconda and IPython.

Steps:

  1. Install Miniconda: Conda cheatsheet
  2. Verify conda is installed running conda -V
  3. Create new virtual environment (in this example, we are using python 3.9): conda create --name py39 python=3.9
  4. Check that env shows in conda env list
  5. To start the environment: conda activate py39
  6. Install IPython: pip install ipython
  7. Install any other libraries needed: ex. pip install requests, pip install python-ldap
  8. Start ipython: ipython
  9. To exit ipython: exit
  10. To leave virtual env: conda deactivate