This is a development version (9.14.0.dev) and may be unstable. Go to latest (9.13.0)
{ } Raw JSON

bundles / IPython 9.14.0.dev / IPython / core / interactiveshell / InteractiveShell / init_virtualenv

function

IPython.core.interactiveshell:InteractiveShell.init_virtualenv

source: /IPython/core/interactiveshell.py :933

Signature

def   init_virtualenv ( self )

Summary

Add the current virtualenv to sys.path so the user can import modules from it. This isn't perfect: it doesn't use the Python interpreter with which the virtualenv was built, and it ignores the --no-site-packages option. A warning will appear suggesting the user installs IPython in the virtualenv, but for many cases, it probably works well enough.

Extended Summary

Adapted from code snippets online.

http://blog.ufsoft.org/2009/1/29/ipython-and-virtualenv

Aliases

  • IPython.InteractiveShell.init_virtualenv