https://docs.python.org/3/tutorial/venv.html
12. Virtual Environments and Packages
Introduction: Python applications will often use packages and modules that don’t come as part of the standard library. Applications will sometimes need a specific version of a library, because the ...
docs.python.org
1. 비주얼 스튜디오에서 새 터미널 열기
터미널에서 위의 명령어를 실행하면
hayley라는 가상환경이 생긴다.
가상 환경 들어가는 방법
1. 가상 환경을 생성한 Script 폴더로 이동한다.

2. activate 명령어를 입력한다.
activate 시 PowerShell에서 파이썬을 실행한 경우 다음과 같은 문제가 발생할 수 있다.
비주얼 스튜디오 코드는 기본 터미널이 파워셀로 설정되어 있기 때문에 발생한 문제이다.
해결 방법
ctrl + shift + p를 누르고 terminal select default까지만 치면 아래와 같이 검색 결과가 나온다.
해당 기능을 선택하고 Command Prompt를 선택한다.
프로그램을 종료하고 다시 activate를 실행하면 hayley 라는 가상환경이 만들어졌다.
'preprocessing' 카테고리의 다른 글
IntCastingNaNError: Cannot convert non-finite values (NA or inf) to integer (0) | 2023.03.07 |
---|---|
int 변경 시 NaN 값 오류 처리 (0) | 2023.02.22 |
Categorical Index를 원하는 순서로 정렬하기 (0) | 2023.02.14 |
Maria DB to Pandas DataFrame (0) | 2023.02.08 |
데이터 구간별 범주화하기 - cut(), crosstab() (0) | 2023.02.03 |