우분투 서버에는 주피터노트북이 기본 환경에 설치되지 않음. 가상환경을 만들고 설치해야하며, 이때 Gamma가 사용가능하기 위해서는 같은 가상환경에 Gamma도 설치할 것을 권장한다고 함.
서버에 로그인 후, Jupyter 설치:
# 1. 시스템 패키지 목록 업데이트 및 업그레이드
sudo apt update
sudo apt upgrade -y
# 2. pip 및 파이썬 관련 패키지 설치
sudo apt install python3-pip -y # Python 3용 pip 설치
sudo apt install python-is-python3 -y # python 명령어를 python3로 연결
# 3. pip 업그레이드 및 Jupyter 설치
pip install --upgrade pip # 최신 버전으로 pip 업그레이드
pip install jupyter # Jupyter Notebook 설치
# 4. Jupyter 관련 의존성 패키지 설치 (선택적)
sudo apt install jupyter-core -y # Jupyter의 핵심 구성요소 설치 (대부분 pip로 커버됨)
jupyter notebook --generate-config
기본 위치는: ~/.jupyter/jupyter_notebook_config.py
비밀번호를 해시로 생성:
python3 -c "from notebook.auth import passwd; print(passwd())"
'sha1:abc123...' 같은 해시가 출력됨~/.jupyter/jupyter_notebook_config.py 열기:
nano ~/.jupyter/jupyter_notebook_config.py