1 | initial version |
To activate virtualenv within a Makefile, you can use the following command:
venv:
. path/to/virtualenv/bin/activate && pip install -r requirements.txt
This command first activates the virtual environment by sourcing the activate script, and then installs the required packages from the requirements.txt file using pip. The . activate
command ensures that the subsequent pip commands are executed within the virtual environment. You can then run this command by typing make venv
in your terminal/shell.