Questions tagged [virtualenvwrapper]

virtualenvwrapper is a set of extensions to Ian Bicking’s virtualenv tool. The extensions include wrappers for creating and deleting virtual environments and otherwise managing your development workflow, making it easier to work on more than one project at a time without introducing conflicts in their dependencies.

virtualenvwrapper is a set of extensions to Ian Bicking’s tool. The extensions include wrappers for creating and deleting virtual environments and otherwise managing your development workflow, making it easier to work on more than one project at a time without introducing conflicts in their dependencies.

Features

  • Organizes all of your virtual environments in one place.
  • Wrappers for managing your virtual environments (create, delete, copy).
  • Use a single command to switch between environments.
  • Tab completion for commands that take a virtual environment as argument.
  • User-configurable hooks for all operations (see Per-User Customization).
  • Plugin system for more creating sharable extensions (see Extending Virtualenvwrapper).

Source: https://virtualenvwrapper.readthedocs.io/en/latest/

665 questions
2467
votes
16 answers

How to leave/exit/deactivate a Python virtualenv

I'm using virtualenv and the virtualenvwrapper. I can switch between virtualenv's just fine using the workon command. me@mymachine:~$ workon env1 (env1)me@mymachine:~$ workon env2 (env2)me@mymachine:~$ workon env1 (env1)me@mymachine:~$ How do I…
Apreche
  • 30,042
  • 8
  • 41
  • 52
2016
votes
8 answers

What is the difference between venv, pyvenv, pyenv, virtualenv, virtualenvwrapper, pipenv, etc?

Python 3.3 includes in its standard library the new package venv. What does it do, and how does it differ from all the other packages that match the regex (py)?(v|virtual|pip)?env?
Flimm
  • 136,138
  • 45
  • 251
  • 267
1677
votes
41 answers

Use different Python version with virtualenv

How do I create a virtual environment for a specified version of Python?
Ulf
  • 17,492
  • 5
  • 19
  • 13
261
votes
23 answers

How to use MySQLdb with Python and Django in OSX 10.6?

This is a much discussed issue for OSX 10.6 users, but I haven't been able to find a solution that works. Here's my setup: Python 2.6.1 64bit Django 1.2.1 MySQL 5.1.47 osx10.6 64bit I create a virtualenvwrapper with --no-site-packages, then…
Joe
  • 25,307
  • 12
  • 38
  • 35
218
votes
3 answers

What is the relationship between virtualenv and pyenv?

I recently learned how to use virtualenv and virtualenvwrapper in my workflow but I've seen pyenv mentioned in a few guides but I can't seem to get an understanding of what pyenv is and how it is different/similar to virtualenv. Is pyenv a…
truth1ness
  • 4,831
  • 5
  • 21
  • 19
201
votes
14 answers

List all virtualenv created by virtualenvwrapper

In virtualenvwrapper, is there a simple way to list all virtualenv on my machine? (like what yolk -l does to list all python packages in the current virtual environment?) CLARIFICATION: "ls -la" in my env directory does not count. I am looking for…
Calvin Cheng
  • 35,640
  • 39
  • 116
  • 167
157
votes
25 answers

Where is virtualenvwrapper.sh after pip install?

I'm trying to setup virtualenvwrapper on OSX, and all the instructions and tutorials I've found tell me to add a source command to .profile, pointing towards virtualenvwrapper.sh. I've checked all the python and site-packages directories, and I…
zakdances
  • 22,285
  • 32
  • 102
  • 173
141
votes
6 answers

Where should virtualenvs be created?

I'm confused as to where I should put my virtualenvs. With my first django project, I created the project with the command django-admin.py startproject djangoproject I then cd'd into the djangoproject directory and ran the command virtualenv…
Jim
  • 13,430
  • 26
  • 104
  • 155
126
votes
2 answers

Rename an environment with virtualenvwrapper

I have an environment called doors and I would like to rename it to django for the virtualenvwrapper. I've noticed that if I just rename the folder ~/.virtualenvs/doors to django, I can now call workon django, but the environment still says…
hobbes3
  • 28,078
  • 24
  • 87
  • 116
122
votes
9 answers

virtualenvwrapper and Python 3

I installed python 3.3.1 on ubuntu lucid and successfully created a virtualenv as below virtualenv envpy331 --python=/usr/local/bin/python3.3 this created a folder envpy331 on my home dir. I also have virtualenvwrapper installed.But in the docs…
damon
  • 8,127
  • 17
  • 69
  • 114
122
votes
14 answers

bash: mkvirtualenv: command not found

After following the instructions on Doug Hellman's virtualenvwrapper post, I still could not fire up a test environment. [mpenning@tsunami ~]$ mkvirtualenv test -bash: mkvirtualenv: command not found [mpenning@tsunami ~]$ It should be noted that…
Mike Pennington
  • 41,899
  • 19
  • 136
  • 174
98
votes
18 answers

/usr/bin/python3: Error while finding spec for 'virtualenvwrapper.hook_loader' (: No module named 'virtualenvwrapper')

I'm trying to follow How To Serve Django Applications with uWSGI and Nginx on Ubuntu 14.04 and I'm failing at the very earlier stage, due to amount of output, I placed all related information into Pastebin.com - #1 paste tool since 2002!. the actual…
alexus
  • 7,256
  • 12
  • 44
  • 66
91
votes
4 answers

Python - manually install package using virtualenv

I have a python program I want to install into my virtualenv - it's a zip package that I need to unzip and then run a setup.py program - but my question is more regarding how to get these unzipped files into my virtualenv so that the package gets…
Jamison
  • 2,218
  • 4
  • 27
  • 31
83
votes
21 answers

How to automatically activate virtualenvs when cd'ing into a directory

I have a bunch of projects in my ~/Documents. I work almost exclusively in python, so these are basically all python projects. Each one, e.g. ~/Documents/foo has its own virtualenv, ~/Documents/foo/venv (they're always called venv). Whenever I…
Alex Lenail
  • 12,992
  • 10
  • 47
  • 79
82
votes
4 answers

How to set virtualenv for a crontab?

I want to set up a crontab to run a Python script. Say the script is something like: #!/usr/bin/python print "hello world" Is there a way I could specify a virtualenv for that Python script to run in? In shell I'd just do: ~$ workon myenv Is there…
Continuation
  • 12,722
  • 20
  • 82
  • 106
1
2 3
44 45