카테고리 없음

Anaconda 사용법

개발자_이훈규 2019. 8. 23. 09:57

1. Install

https://www.anaconda.com/distribution/#windows

 

2. 가상환경 설정

(base) PS C:\Users\hklee> conda create --name test numpy pandas=0.24.2 pandas-datareader

 

3. 가상환경 실행

(base) PS C:\Users\hklee> conda activate test

(test) PS C:\Users\hklee>

 

4. jupyter 실행

(test) PS C:\Users\hklee> jupyter notebook

 

설치시, (test) PS C:\Users\hklee> conda install jupyter

 

import numpy as np
import pandas as pd
import pandas_datareader.data as web

goog = web.DataReader('GOOG', data_source='yahoo', start='3/14/2009', end='4/14/2014')
goog.tail()

 

저장시, C:\Users\%USERNAME% 에 파일이 저장됨

 

5. 가상환경 종료

(test) PS C:\Users\hklee> conda deactivate

(base) PS C:\Users\hklee>

 

6. 가상환경 삭제

(base) PS C:\Users\hklee> conda remove --name test --all

 

7. Install library

$ conda install scipy

특정 환경에 설치 (name : py33test) $ conda install -n py33test scipy

 

8. Update library

$ conda update pandas

$conda update -n py33test pandas

 

9 . Remove library

$ conda remove scipy

$ conda remove -n test scipy

실제 제거하기 전에 예비 시행 $conda remove --dry-run -n test scipy

 

10. conda library 검색

$ conda info

$ conda search pytables

정규식으로 검색 pyt로 시작하는 모든 패키지 $ conda list ^pyt

$ conda list ^p.*les$