跟我一起学python第二讲 开发工具Jupyter Notebook安装和远程访问设置
来源:互联网 发布:mysql获取第一条记录 编辑:程序博客网 时间:2024/05/22 14:01
******安装Jupyter Notebook******
第一步:安装ipython,安装完成后输入ipython,如下图,输入exit可退出
pip install ipython
第二步:安装jupyter pip install jupyter
第三步:配置环境,通过远程方式访问jupyter notebook
1, jupyter notebook --generate-config
如果出现以下提示,请在之前的命令后面加 –allow-root
jupyter notebook –generate-config –allow-root
[C 09:07:26.948 NotebookApp] Running as root is not recommended. Use –allow-root to bypass.
2,生成登陆密码 这一步其实用不到,因为在虚拟机环境下不建议使用密码登录,修改配置文件的时候密码建议屏蔽,如果是云主机还是有必要
打开ipython,创建一个密文的密码:
[root@localhost ~]# ipythonPython 3.5.2 (default, Aug 4 2017, 02:13:48) Type 'copyright', 'credits' or 'license' for more informationIPython 6.1.0 -- An enhanced Interactive Python. Type '?' for help.In [1]: from notebook.auth import passwdIn [2]: passwd()Enter password: Verify password: Out[2]: 'sha1:5311cd8b9da9:70dd3321fccb5b5d77e66080a5d3d943ab9752b4'
第四步:修改第一步生成的配置文件,将以下几个地址修改如下,并且去掉该行前的#,使其生效
vi /root/.jupyter/jupyter_notebook_config.py 或者
vi ~/.jupyter/jupyter_notebook_config.py
c.NotebookApp.ip='*'c.NotebookApp.password = u'sha1:5311cd8b9da9:70dd3321fccb5b5d77e66080a5d3d943ab9752b4'c.NotebookApp.open_browser = Falsec.NotebookApp.port =8888 #随便指定一个端口,使用默认8888也可以第五步:访问jupyter notebook现在命令行下开启服务,查看系统指定的是哪个端口,有可能是8889jupyter notebook --ip=0.0.0.0 --no-browser --allow-root
打开firewall浏览器,输入http://192.168.1.100:8889 这个地址是虚拟机系统的ip地址 ,如果发现无法访问,一般是centos系统防火墙没有关闭,使用以下命令进行关闭
1、关闭firewall:systemctl stop firewalld.service #停止firewallsystemctl disable firewalld.service #禁止firewall开机启动firewall-cmd --state #查看默认防火墙状态(关闭后显示notrunning,开启后显示running)
再次访问,出现以下界面,说明可以正常访问了!
输入之前设置的密码就可以登陆了!!!congratulations!!!
小例子:使用jupyter notebook 练习一个99乘法表吧
下一讲预告:集成开发工具pycharm的安装和远程访问设置
- 跟我一起学python第二讲 开发工具Jupyter Notebook安装和远程访问设置
- 跟我一起学python第一讲 python开发环境安装
- 跟我一起学python第三讲 python集成开发环境pycharm安装
- Python---jupyter notebook 远程访问
- 设置 jupyter notebook 可远程访问
- jupyter notebook设置远程访问权限
- 设置 jupyter notebook 可远程访问
- Python和jupyter notebook安装
- 远程访问jupyter notebook
- 远程访问jupyter notebook
- jupyter notebook远程访问
- 远程访问jupyter notebook
- 远程访问jupyter notebook
- 远程访问jupyter notebook
- 远程访问jupyter notebook
- 远程访问jupyter notebook
- ipython开发工具Jupyter Notebook安装
- Jupyter notebook远程访问服务器
- 大数据概述
- Git for Windows安装和基本设置
- 02C++单例模式线程安全问题
- JavaScript的数组定义和长度获取
- Unity中在Uptate中只做一次的方法
- 跟我一起学python第二讲 开发工具Jupyter Notebook安装和远程访问设置
- POJ-1251-Jungle Roads
- 树状数组--快捷的线段树
- memcpy和memmove区别
- 在phpcms中的内容详情页中,输出时间
- 浅谈python 数据类型和变量
- 慢慢认识大数据
- S3C6410通过按键玩中断
- 记录下第一个代码博客