rs2002.log
로그인
rs2002.log
로그인
제로베이스_EDA/웹크롤링_오리엔테이션
KulangK
·
2023년 5월 29일
팔로우
0
EDA
웹크롤링
제로베이스
0
EDA/웹크롤링
목록 보기
1/9
환경 설정 (Win)
miniconda3 설치
https://docs.conda.io/en/latest/miniconda.html
install the latest version
설치할때 PATH 추가하지 않았다면, 시스템 환경변수에 들어가서 miniconda3, library, script 폴더를 추가해주면 됨. (재부팅 필수)
vscode에서 무언가 진행할때 conda command를 불러오지 못한다면 path추가 후 재부팅하면 해결 됨.
version check
open: 'anaconda prompt (miniconda3)'
enter: conda --version
conda update conda >> gives you the latest updates
env(가상 환경) 생성
enter: conda create -n ds_study python=3.8
강의에서 python 3.8버전 기반으로 진행되므로 해당 버전에 맞게 환경 설정
또한 ds_study라는 이름의 환경에서 진행될 예정.
env 목록: conda env list
env 제거: conda env remove -n name
env 활성화
enter: conda activate envName
e.g. conda activate ds_study
패키지는 특정 env에만 해당되므로, 활성화 시킨다음에 설치할 것
패키지 관련 모듈 등을 못 불러 온다면 환경 활성화가 되었는지 확인 필요
jupyter notebook 및 다른 패키지 설치
conda install jupyter
conda install ipython
conda install matplotlib
conda install seaborn
conda install pandas
conda install sklearn *
conda install xlrd
sklearn은 오류가 있어
https://anaconda.org/anaconda/scikit-learn
아나콘다 웹페이지 참고하여 다른 명령어로 설치함
conda install -c anaconda scikit-learn
Jupyter Notebook 실행
jupyter 설치되어 있는 환경 활성화 후 jupyter notebook 입력
웹 브라우저 나타나면 성공
test
우측 상단 new > python 3 > import this, 실행
실행: shift + enter
python 관련 글이 나타나면 됨.
matplotlib 한글 설정
Jupyter 종료
좌측 상단 File > Close and Halt
vscode 설치 및 셋업
PATH 설정해야함
문서에 ds_study폴더 생성
test.py 생성하고 작동 확인 (생성이 불가할 경우, vscode를 관리자 권한으로 실행하면 됨)
ctrl + shift + P >> select interpreter >> 위에서 만들었던 conda python 3.8 interpreter 선택
.ipnyb 파일 생성후 사용할 때 주피터 서버는 conda prompt에 나타나는 url이나 서버를 복붙하면 됨.
Colab
구글 계정 생성 후
https://colab.research.google.com/
접속
새 노트 생성하고 코드 쓰면 됨
코드가 입력된 shell 실행 방법 >> shift + enter / 왼쪽 삼각형 모양 클릭
런타임 메뉴
모두 실행: 긴 노트의 코드를 한 번에 실행
실행 중단: 응답이 없거나, 긴 시간 실행 중인 경우 코드 중단
런타임 다시 시작: 메모리에 저장된 변수/실행 결과 모두 초기화하고 다시 실행
도구 메뉴
명령 팔레트 (vscode command pallette와 동일)
colab 환경에서 matplotlib 한글 폰트 사용하려면
!pip install koreanize-matplotlib
import koreanize-matplotlib
위 두줄 사용하면 됨
문서화 작업
좌측 목차 아이콘 선택, 섹션 선택
velog와 같이 마크다운 편집
런타임에 업로드 하는 경우는 시간 지나거나 다시 런타임 시작하면 삭제
영구적으로 접근하기 위해 구글 드라이브와 연동 필요
!ls: 파일 목록 조회
KulangK
새싹 데이터 분석가 https://github.com/KulangK
팔로우
다음 포스트
제로베이스_EDA/웹크롤링(1)_Pandas 기초
0개의 댓글
댓글 작성