[Python] requirements.txt 생성과 requirements.txt 속 패키지 설치
설치된 패키지 목록 requirements.txt 생성 가상 환경(venv) 혹은 현재 python에 pip로 설치된 패키지 목록에 대한 정보를 만들기 위해서는 freeze라는 명령어를 사용하면 된다. freeze 명령어를 통해 나온 출력 결과를 파일로 저장하려면 아래와 같이 입력하면 된다. pip freeze >requirements.txt requirements.txt 안에 있는 패키지 설치 반대로 requirements.txt라는 파일이 주어졌을 때, 그 안에 있는 패키지들을 모두 설치하기 위해서는 아래 명령어를 입력한다. pip install -r requirements.txt 참고 링크: docs.python.org/ko/3/tutorial/venv.html
2023.06.02