Virtualenv

Posted on 01.10.2017

  • Virtualenv Reference
  • Create a new venv virtualenv NAME
  • Activate NAME . NAME/bin/activate
  • Activate NAME NAME\scripts\activate
  • Deactivate deactivate

Virtualenvwrapper

  • Virtualenvwrapper-win
  • Reference
  • Make a new venv mkvirtualenv ENVNAME
  • List all virtualenvs workon or lsvirtualenv
  • Activate a virtualenv workon ENVNAME
  • Deactivate virtualenv deactivate
  • Remove virtualenv deactivate and then rmvirtualenv ENVNAME
  • Bind ENVNAME to project setprojectdir <project_path>
  • Bind ENVNAME to project setvirtualenvproject [virtualenv_path project_path]

Virtualenvwrapper-win not finding virtualenv-script.py

  • Edit C:\PythonXY\scripts\mkvirtualenv.bat with the following changes on lines 47, 48
  • Line 47 virtualenv.exe %*
  • Line 48 REM python.exe “%PYHOME%\Scripts\virtualenv-script.py” %ARGS%