VirtualEnvWrapper is commonly used by Python developers to manage their virtual environments. While many of them are familiar with the
mkvirtualenv command and use it frequently, this article will focus on the less popular
mkproject command and guide how to use it effectively.
To start a new project, create a folder within the
~/Dev folder with the same name as the project. Then, create a virtual environment with the same name using the
Instead of performing the two steps above manually, use the
mkproject command to create a project folder and virtual environment folder automatically.
Running the command
mkproject project_b creates a folder in
~/Dev and a virtual environment folder in
PROJECT_HOME setting controls the project folder's location, and the
WORKON_HOME setting controls the virtual environment folder's location.
|Parent folder for
You can override the defaults as shown below.
When starting a new Python or Django project, remember to use the
mkproject command for a faster and more efficient setup.
Have a comment to share or a question to raise? Join our Discord server.