This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
설치되지 않은 python 환경에서 xgboost를 임포트 하면 다음과 같이 오류가 뜬다.
xgboost 라는 모듈이 없다는 에러가 발생
이제 설치를 해보자.
파이썬 가상 환경 생성
이 과정을 필수가 아니다. 다만 권장 사항이다.
어떤 과제를 진행하더라도 파이썬 가상 환경을 생성한 뒤 설치/진행하는 것을 추천한다.
가상 환경을 생성하는 방법은 다양한데 본인이 선호하는 방법으로 생성하면 된다.
여기에서는 venv를 사용한다.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
가상 환경을 사용하는 경우만 해당된다. 위에서 생성한(혹은 사용하는) 가상 환경을 활성화한다.
(생성 위치)/bin/activate를 실행시켜 가상 환경을 활성화시켜준다.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
가장 하단 라인처럼 가상환경 이름(py_xgboost)이 커맨드 라인 맨 앞에 표기 되어있으면 성공
pip를 이용한 설치
우선 pip를 업그레이드시켜주고
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters