파이썬 가상환경 venv

가상환경이란? 필요한 이유는?

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/283050ba-014a-4620-9331-c5f9e7ab8b97/Untitled.png

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/cd82e81c-16e6-4897-96fb-1dc73b0b78b7/Untitled.png

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/3e834c7b-78eb-4e23-b414-473675dea80f/Untitled.png

어떤 능력있는 개발자가 다음과 같이 세개의 파이썬 프로젝트를 진행하고 있다고 가정해봅시다.

파이썬의 개발 환경 도구들

venv in linux

$ python3 -m venv <your-env>
$ source <your-env>/bin/activate
$ deactivate

venv in windows

# powershell에서 python 실행 시 잘 작동하는지 확인이 필요합니다!!
> python3 -m venv <your-env>
> <your-env>/Scripts/activate
> deactivate

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/029caf34-a378-4243-b808-e16a3f38cb42/Untitled.png

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/e278039e-52bd-4aba-ae16-911308f8bc46/Untitled.png

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/fa98999a-54fb-4cc8-869f-0cc9a648a7c0/Untitled.png