use python venv module to setup a virtualenv

Leo ·

use python venv module to setup a virtualenv

Replies

Leo ·

This command will create a virtualenv at your desired path. Create a folder to contain your virtualenvs according to your own organizational preferences. I like to have the folder somewhere prominent and easy to find, like in a python folder I made to hold all my python projects. The reason being that you need to reference the path when you activate the virtualenv, and I like to be able to use the Mac Finder gui to drag and drop the virtualenv you want to activate instead of remembering and manually typing the path in terminal

Leo ·

Alternatively to manually creating and activating a virtualenv, you can use an IDE like PyCharm to create a new virtualenv or attach an existing one to a project so that the IDE's terminal and run configs can be launched within the virtualenvhttps://www.jetbrains.com/help/pycharm/creating-virtual-environment.html