Wiki source code of How to Create a VirtualEnv
Last modified by Leon Poon on 2021/03/23 13:16
Show last authors
| author | version | line-number | content |
|---|---|---|---|
| 1 | In a console, [[change directory>>url:https://wiki.codepowered.com/wiki/How_to_Work_with_Present_Working_Directory_in_Console]] to the parent directory where you want the virtual env to be. | ||
| 2 | |||
| 3 | Make sure [[the virtualenv tool is installed>>doc:Computing Newbies.Python Newbies.How to Install virtualenv tool in Debian, Raspbian, etc.WebHome]]. | ||
| 4 | |||
| 5 | In the console, run: | ||
| 6 | |||
| 7 | {{code}} | ||
| 8 | virtualenv -p $(which python3) your_venv_dir_name_here | ||
| 9 | {{/code}} | ||
| 10 | |||
| 11 | (Make sure you replace your_venv_dir_name_here with the desired name.) |