Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is "workon" when using the Django framework?

What is workon when using the Django framework?

Is it true that when using virtualenv, then you need to activate or deactivate, and so forth, but if you install and use virtualenvwrapper, then you don't have to do all that and can just create environments and use workon to switch? Can someone give an introduction as to how virtualenv, virtualenvwrapper, and workon relate to each other?

like image 686
nonopolarity Avatar asked Mar 26 '26 04:03

nonopolarity


1 Answers

workon project_a means that you switch the the virtual environment project_a. In other words, when you type python or python manage.py you have access to the project_a libraries.

Is it true that when using virtualenv, then you need to activate or deactivate, and so forth, but if you install and use virtualenvwrapper, then you don't have to do all that and can just create environments and use workon to switch?

Yes. Roughly, workon project_b is the same than:

deactivate
source project_b/venv/path/bin/activate
like image 72
François Constant Avatar answered Mar 28 '26 20:03

François Constant



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!