python安裝jupter在線ide

我在虛擬3.6.8的環境裏面安裝的,具體用了以下命令;

pip install ipython -i https://mirrors.aliyun.com/pypi/simple/ 
pip install jupyter -i https://mirrors.aliyun.com/pypi/simple/ 
jupyter notebook

當然,jupter可以直接通過python環境裏script目錄下的 jupyter-notebook.exe可執行文件打開

建議將jupyter-notebook.exe發送到桌面快捷方式,然後設置起始位置,作爲jupter的主頁,如圖

然後每次雙擊桌面的jupter快捷方式即可自動瀏覽器web打開程序

jupter映射公網訪問參考下面兩個帖子,總結後得出:

https://blog.csdn.net/huyun9666/article/details/85332976          遠程訪問教程

1.先生成配置文件:

jupyter notebook --generate-config

2.生成密碼Json:

jupyter notebook password

 3.進入剛生成的配置文件目錄,編輯配置文件,裏面增加以下信息:

c.NotebookApp.ip='*'
c.NotebookApp.password = u'sha1:973ff4c74464:1be8be9ea5a87fb5ab0a6b45d37333ec45859b4f'
c.NotebookApp.open_browser = True  #啓動服務端後自動打開瀏覽器。
c.NotebookApp.port =8888 #隨便指定一個端口

其中的password我設置的123456,然後通過jupyter_notebook_config.json文件打開後複製過來的,這個文件的剛創建的密碼json,其中大概長這樣:

{
  "NotebookApp": {
    "password": "sha1:973ff4c74464:1be8be9ea5a87fb5ab0a6b45d37333ec45859b4f"
  }
}

弄完後還是一樣桌面快捷方式啓動jupyter,然後 就讓輸密碼了。

反正通過局域網ip加端口號一樣可以訪問的。這樣,我實現在手機上訪問局域網電腦的jupyter肝代碼了

如果還想通過域名訪問,沒問題,frp內網穿透以下就好了。圖方便的話用ngrok也行,別人的免費的,但是就是速度太慢了

有個命令: 

ngrok http 8888

虛擬環境中順帶安裝一些常用庫

pip install lxml -i https://mirrors.aliyun.com/pypi/simple/
pip install PyExecJS -i https://mirrors.aliyun.com/pypi/simple/
pip install requests -i https://mirrors.aliyun.com/pypi/simple/
pip install pypinyin -i https://mirrors.aliyun.com/pypi/simple/
pip install django==2.2 -i https://mirrors.aliyun.com/pypi/simple/

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章