Search code examples
pythonbashpython-2.7virtualenvvirtualenvwrapper

Activating an existing virtualenv through bash


I have installed virtualenvwrapper on my Debian machine and followed a guide to install the project I meant to put in this environment. I was able to launch my project and it worked in its own virutalenv.

I have rebooted my system, and when using lsvirtualenv -l I recieve the following prompt:

MITMf
=====

My question is, How do I activate my project again? I cant seem to find any answer of how can I activate it again as currently I'm not "inside" the virtual environment as I was when I finished my installation.


Solution

  • The workon command allows you to list or change working environments:

    Syntax:

    workon [(-c|--cd)|(-n|--no-cd)] [environment_name|"."]

    If no environment_name is given the list of available environments is printed to stdout.

    So this should do the trick:

    workon MITMf