R용 Jupyter 설치

데이터 분석 2019. 7. 27. 09:56 Posted by UnHa Kim

과거 데이터 통계 분석에 유용한 R언어의 개발환경인 Jupyter의 설치법을 기록해 둔다.

 

R 설치

https://www.r-project.org/

 

Python 설치

https://www.python.org/

 

Jupyter 설치 

 

최신 정보는 https://jupyter.org/install 참조

 

python -m pip install --upgrade pip

python -m pip install jupyterlab 

python -m pip install notebook

 

Jupyter용 R 패키지 설치

<R 커맨드 창에서 실행>

install.packages('IRkernel')

IRkernel::installspec()

 

IRkernel::installspec() 실행할 때 'In system2("jupyter", c("kernelspec", "--version"), FALSE, FALSE) :
  명령을 실행하는 도중 에러가 발생하였습니다.'라는 에러가 발생하는 경우 jupyter 및 jupyter-kernelspec 실행화일이 위치한 디렉토리를 실행경로에 포함시켜야 한다.

리눅스에서는 ~/.profile 파일에   PATH=$PATH:<추가할 경로> 를 추가해 주면 된다.

윈도우에서는 고급 시스템 설정의 환경 변수 설정에서 PATH 환경 변수에 추가해 준다.

 

Jupyter 노트북 실행

<cmd 창에서 실행>

jupyter lab 혹은 jupyter notebook

 

P.S> Jupyter 관련 내용에 jupyterlab과 함께 클래식 notebook도 함께 넣음.