명령어 설명
설명 | Windows | Linux / macOS |
가상환경 생성 | python -m venv .venv | python3 -m venv .venv |
가상환경 활성화 | .venv\Scripts\activate | source .venv/bin/activate |
가상환경 비활성화 | deactivate | deactivate |
패키지 설치 | pip install <패키지명> | pip install <패키지명> |
패키지 제거 | pip uninstall <패키지명> | pip uninstall <패키지명> |
설치된 패키지 목록 보기 | pip list | pip list |
패키지 목록 저장 | pip freeze > requirements.txt | pip freeze > requirements.txt |
패키지 목록으로 설치 | pip install -r requirements.txt | pip install -r requirements.txt |
Python 실행 경로 확인 | where python | which python |
Python / pip 버전 확인 | python --versionpip --version | python3 --versionpip --version |
가상환경 삭제 | rmdir /s .venv | rm -r .venv |
반응형