원래 보통 분석할 때 Jupyter Notebook에서 많이 진행했다.

 

새로운 프로젝트를 진행하면서 VSCode를 처음 사용해 봤는데, 

프로젝트 디렉토리 관리, Extensions를 통한 편의성 등이 비교도 안되게 편했다.

 

다만, 로컬PC에 있는 VSCode 작업공간 내에서 .ipynb 파일을 생성해서 작업하는 것은 가능했지만,

개발 서버에 존재하는 docker container 안에 있는 jupyter notebook을 파이썬 인터프리터로 사용하지 못해

개발 서버에서 테스트하기가 어려웠다.

 

그래서 찾아보니 VScode에는 "Connect to a remote Jupyter Server" 기능이 존재한다. **참고1

여기에 실행 중인 Jupyter Notebook 주소를 넣으면 해당 인터프리터 내에 존재하는 파이썬 커널 사용이 가능하다.

(처음에 F1 단축키 누른 후,  "Notebook: Select Notebook Kernel" 선택하면 다음 버튼으로 선택 가능하다.) **참고2

 

 

※ "Connect to a remote Jupyter Server" 기능은 VScode 내에 python (또는 jupyter) Extension이

    설치되어 있어야 보이는 것 같다. 

 

※ 로컬 PC에 Docker Desktop을 설치하면 Extension을 활용해서 진행할 수 있다는 의견이 있었으나,

    라이선스 이슈가 걸려서 실행하지 않았다.

 

**참고

1. https://code.visualstudio.com/docs/datascience/notebooks-web#_connect-to-a-remote-jupyter-server

 

Jupyter Notebooks on the web

Working with Jupyter notebooks on the web with Visual Studio Code.

code.visualstudio.com

2. https://code.visualstudio.com/docs/datascience/jupyter-notebooks#_connect-to-a-remote-jupyter-server

 

Working with Jupyter Notebooks in Visual Studio Code

Working with Jupyter Notebooks in Visual Studio Code.

code.visualstudio.com

 

+ Recent posts