|
|
|
|
|
by j4mie
4867 days ago
|
|
See also "Virtualenv's bin/activate is Doing It Wrong": https://gist.github.com/datagrok/2199506 The activate/deactivate magic is responsible for some real nastiness in deployment scripts, and total confusion for beginners who are thrown by the statefulness. Virtualenvwrapper makes the situation even worse by hiding the virtual environments away. By far the easiest way to use virtualenv is to forget about activation completely, and directly reference the binary you want to use. For example, rather than typing: source env/bin/activate
python myprogram.py
Just run env/bin/python myprogram.py
It's an extra few characters on every command, but it's worth it to totally remove the magic. |
|