venv provides python virtual environment, so it helps to separate a package dependencies per project.
we had to use virtualenv before Python 3.4, but since then it has been built-in as a basic tool.
Usage
The following usage contains a <name>. It means that the name of virtual environment and it will become a folder name as well.
Create a virtual environment
$ python3 -m venv <name>
Activate a virtual environment
- On MAC / Linux
$ source ./<name>/bin/activate
- On Windows
$ .\<name>\Scripts\activate
Deactivate a virtual environment
$ deactivate
'Python' 카테고리의 다른 글
[Python] Beautiful Soup4 module (0) | 2020.10.09 |
---|---|
[Python] requests module (0) | 2020.10.08 |
[Python] Abstract Class (0) | 2020.09.28 |
[Python] pip (0) | 2020.09.11 |
[Python] pyenv (0) | 2020.08.29 |
댓글