Skip to content

Instantly share code, notes, and snippets.

@fak
Last active December 30, 2015 12:19
Show Gist options
  • Save fak/e757472aacb77eebc377 to your computer and use it in GitHub Desktop.
Save fak/e757472aacb77eebc377 to your computer and use it in GitHub Desktop.
using virtualenv without virtualenvwrapper

But virtualenvwrapper is awesome...

Yes it is, but some situations might make it difficult for us to use it. For example, we might be working on system without root access and thus be unable to install virtualenvwrapper using sudo pip install virtualenvwrapper.

In that case we have to work with virtualenv as it is. This is not very dramatic, we just have to manage the location of virtualenv by ourselves.

So in any suitable location, we can create a virtualenv (eg bootstrap) with virtualenv bootstrap and activate it using source bootsrap/bin/activate. From that point onwards, we are operating on the virtualenv. At least from version 1.10+, virtualenv already has pip installed so we can install any package with pip. To revert to the system we can simply do deactivate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment