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/

 

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