Python3 jupyter notebook 服務(wù)器搭建過程
1. jupyter notebook 安裝
•創(chuàng)建 jupyter 目錄
mkdir jupyter cd jupyter/
•創(chuàng)建獨(dú)立的 Python3 運(yùn)行環(huán)境,并激活進(jìn)入該環(huán)境
virtualenv --python=python3 --no-site-packages venv source venv/bin/activate
•安裝 jupyter
pip install jupyter
2. jupyter notebook 配置
•創(chuàng)建 notebooks 目錄
mkdir notebooks
用于保存網(wǎng)頁端創(chuàng)建的 ipynb 文件。
•生成配置文件
jupyter notebook --generate-config
生成的配置文件保存在當(dāng)前用戶的 .jupyter 目錄下。
•生成密碼密文
python -c "import IPython; print(IPython.lib.passwd())"
執(zhí)行后輸入密碼,生成類似 'sha1:xxx:xxx' 的密文。
•修改配置文件
c.NotebookApp.allow_remote_access = True # 允許遠(yuǎn)程訪問 c.NotebookApp.ip = '*' # 允許任意ip訪問此服務(wù)器 c.NotebookApp.password = 'sha1:xxx:xxx' # 上一步生成的密文 c.NotebookApp.open_browser = False # 運(yùn)行時(shí)不打開本機(jī)瀏覽器 c.NotebookApp.allow_root =True # 允許使用 root 權(quán)限運(yùn)行 c.NotebookApp.port = 8888 # 指定 jupyter notebook 使用的端口 c.ContentsManager.root_dir = 'notebooks' # 指定 ipynb 等文件的保存目錄
3. 啟動(dòng) jupyter notebook
•直接運(yùn)行
jupyter notebook
•后臺(tái)運(yùn)行
nohup jupyter notebook > ~/jupyter/jupyter.log 2>&1 &
總結(jié)
以上所述是小編給大家介紹的Python3 jupyter notebook 服務(wù)器搭建,希望對(duì)大家有所幫助,如果大家有任何疑問請(qǐng)給我留言,小編會(huì)及時(shí)回復(fù)大家的。在此也非常感謝大家對(duì)腳本之家網(wǎng)站的支持!
- 如何遠(yuǎn)程使用服務(wù)器上的Jupyter notebook
- anaconda?部署Jupyter?Notebook服務(wù)器過程詳解
- 解決服務(wù)器運(yùn)行jupyter notebook方法
- VScode連接遠(yuǎn)程服務(wù)器上的jupyter notebook的實(shí)現(xiàn)
- 文件上傳服務(wù)器-jupyter 中python解壓及壓縮方式
- 使用Jupyter notebooks上傳文件夾或大量數(shù)據(jù)到服務(wù)器
- 服務(wù)器端jupyter notebook映射到本地瀏覽器的操作
- Jupyter notebook遠(yuǎn)程訪問服務(wù)器的方法
- 服務(wù)器 jupyter 文件名亂碼問題及解決方法
相關(guān)文章
Pytorch BCELoss和BCEWithLogitsLoss的使用
這篇文章主要介紹了Pytorch BCELoss和BCEWithLogitsLoss的使用詳解,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。如有錯(cuò)誤或未考慮完全的地方,望不吝賜教2021-05-05
python中l(wèi)ist,ndarray,Tensor間的轉(zhuǎn)換小結(jié)
數(shù)據(jù)類型轉(zhuǎn)換是常見的功能,本文主要介紹了python中l(wèi)ist,ndarray,Tensor間的轉(zhuǎn)換小結(jié),文中通過示例代碼介紹的非常詳細(xì),需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧2024-02-02
python多進(jìn)程及通信實(shí)現(xiàn)異步任務(wù)的方法
這篇文章主要介紹了python多進(jìn)程及通信實(shí)現(xiàn)異步任務(wù)需求,本人也是很少接觸多進(jìn)程的場景,對(duì)于python多進(jìn)程的使用也是比較陌生的。在接觸了一些多進(jìn)程的業(yè)務(wù)場景下,對(duì)python多進(jìn)程的使用進(jìn)行了學(xué)習(xí),覺得很有必要進(jìn)行一個(gè)梳理總結(jié),感興趣的朋友一起看看吧2022-05-05

