centos6.4安装 jupyter-notebook

系统:最小化安装[习惯性]
关闭防火墙:
- systemctl stop firewalld && systemctl disable firewalld
禁用SELINUX:
- [root@jupyter ~]# sed -i 's#SELINUX=enforcing#SELINUX=disabled#g' /etc/selinux/config
- [root@jupyter ~]# setenforce 0
添加EPLE源:
- rpm -ivh http://mirrors.yun-idc.com/epel/epel-release-latest-7.noarch.rpm
安装部分可能用到的依赖包:
- yum install vim openssl-devel readline-devel python-devel python-pip -y
- tar xf Python-3.5.2.tgz
- cd Python-3.5.2
- ./configure --prefix=/usr/local/python-3.5.2
- make && make install
- #创建一个软连接:
- ln -sf /usr/local/python-3.5.2/bin/python3 /usr/bin/python3
- ln -sf /usr/local/python-3.5.2/bin/pip3 /usr/bin/pip3
- pip install jupyter //这命令默认使用的是Python2.7.5版本安装;
安装完后即可以启动:jupyter-notebook
- jupyter-notebook
如果在启动的时候提示,说明默认不建议使用root来运行,不过我们可以配置文件修改,接下来会介绍如何修改;
- [C 15:03:06.778 NotebookApp] Running as root is not recommended. Use --allow-root to bypass.
- [root@pydev ~]# jupyter notebook --generate-config --allow-root
- Writing default config to: /root/.jupyter/jupyter_notebook_config.py
创建一个密码:[这样就不用每次复制URL地址]
- [root@jupyter ~]# ipython
- Python 2.7.5 (default, Nov 6 2016, 00:28:07)
- Type "copyright", "credits" or "license" for more information.
- IPython 5.3.0 -- An enhanced Interactive Python.
- ? -> Introduction and overview of IPython's features.
- %quickref -> Quick reference.
- help -> Python's own help system.
- object? -> Details about 'object', use 'object??' for extra details.
- In [1]: from notebook.auth import passwd
- In [2]: passwd()
- Enter password:
- Verify password:
- Out[2]: 'sha1:da874cad4309:4104089e5ef97c8fcbe69c2ac7d6a1071ca50a40'
- 62 #c.NotebookApp.allow_root = False
- 去掉62行的注释,并修改成True即可解决root权限运行的问题。
- 163 #c.NotebookApp.ip = 'localhost'
- 去掉注释,并把localhost改成0.0.0.0,这样就可以外部访问了,默认只有在本机可以访问的;
- 163 c.NotebookApp.ip = '0.0.0.0'
- 203 #c.NotebookApp.notebook_dir = u''
- 改成如下,这样就会默认把notebook上创建的文件保存到指定目录下;需要事先创建。
- 203 c.NotebookApp.notebook_dir = u'/opt/jupyter'
- 218 #c.NotebookApp.password = u''
- 加入上面创建的密码:
- 218 c.NotebookApp.password = u'sha1:da874cad4309:4104089e5ef97c8fcbe69c2ac7d6a1071ca50a40'
保存,重新运行程序:
- [root@jupyter~]# jupyter-notebook
- [I 15:20:53.313 NotebookApp] Serving notebooks from local directory: /opt/jupyter
- [I 15:20:53.313 NotebookApp] 0 active kernels
- [I 15:20:53.313 NotebookApp] The Jupyter Notebook is running at: http://0.0.0.0:8888/
- [I 15:20:53.313 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
- [W 15:20:53.313 NotebookApp] No web browser found: could not locate runnable browser.
URL地址:10.0.10.253:8888
密码:123456
不过在查看版本的时候还是有个问题,就是切换了python版后,使用命令还是一样显示为python2.7.5
验证:输入命令:netstat -ntlp
[root@localhost centos]$ netstat -ntlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 1/systemd
tcp 0 0 192.168.122.1:53 0.0.0.0:* LISTEN 1980/dnsmasq
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1598/sshd
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 1601/cupsd
tcp 0 0 0.0.0.0:8888 0.0.0.0:* LISTEN 18997/python
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 1874/master
tcp6 0 0 :::111 :::* LISTEN 1/systemd
tcp6 0 0 :::22 :::* LISTEN 1598/sshd
tcp6 0 0 ::1:631 :::* LISTEN 1601/cupsd
tcp6 0 0 :::8888 :::* LISTEN 18997/python
tcp6 0 0 ::1:25 :::* LISTEN 1874/master

centos6.4安装 jupyter-notebook的更多相关文章
- Docker 安装jupyter notebook
1. 利用image运行一个container sudo docker run -it --net=host tingting --net=host:让container可以上网,安装原来的sudo ...
- linux安装python3 ,安装IPython ,安装jupyter notebook
安装python3 下载到 /opt/中 1.下载python3源码,选择3.6.7因为ipython依赖于>3.6的python环境wget https://www.python.org ...
- ubuntu14.04安装jupyter notebook
1.使用pip安装Jupyter notebook: pip install jupyter notebook 2.创建Jupyter默认配置文件: jupyter notebook --genera ...
- windows安装Jupyter Notebook
这是我自定义的Python 的安装目录 (D:\SoftWare\Python\Python36\Scripts) 1.Jupyter Notebook 和 pip 为了更加方便地写 Python 代 ...
- Python---virtualenv + Tensorflow + 安装jupyter notebook
一.ubuntu系统下安装完caffe后,安装 jupyter notebook. 在终端中执行,安装指令: sudo pip install jupyter 安装完成后运行 notebook : j ...
- python如何安装Jupyter notebook
一,安装Jupyter notebook 环境:win10,python3.7 两种安装方式,这里只讲pip安装 pip install jupyter notebook 二,启动Jupyter no ...
- 环境配置 | 安装Jupyter Notebook及jupyter_contrib_nbextensions库实现代码自动补全
一.Jupyter Notebook的安装与启动 安装Jupyter Notebook pip3 install jupyter 启动 jupyter notebook 输入命令后会自动弹出浏览器窗口 ...
- Centos7安装jupyter notebook
安装python3 查看当前python版本 [root@iz1i4qd6oynml0z /]# python -V Python 2.7.5 安装python3以及检查python3的版本 yum ...
- Ubuntu安装Jupyter Notebook
一.Jupyter介绍 Jupyter Notebook是一个交互式笔记本,支持运行40多种编程语言.Jupyter Notebook 的本质是一个 Web 应用程序,便于创建和共享文学化程序文档,支 ...
- 安装Conda并在Conda下安装jupyter notebook
1:安装 conda install jupyter notebook 2:启动 jupyter notebook
随机推荐
- Ubuntu之网易云音乐无法启动
官方最新版(1.1)有这个问题,似乎改成0.9版就可以了 deepin15(32位):http://s1.music.126.net/download/pc/netease-cloud-music_0 ...
- (笔记)Linux下system()函数的深度理解(整理)
注:从其它地方转的非常好的一篇文章,值得深究! 这几天调程序(嵌入式linux),发现程序有时就莫名其妙的死掉,每次都定位在程序中不同的system()函数,直接在shell下输入system()函数 ...
- 获取select 的 val 和 text [转引]
(原文地址:http://apps.hi.baidu.com/share/detail/6152780) jQuery获取Select选择的Text和Value:语法解释:1. $("#se ...
- JAR 归档文件是与平台无关的文件格式
JAR(Java Archive,Java 归档文件)是与平台无关的文件格式,它允许将许多文件组合成一个压缩文件,可以使用Java软件打开. 为 J2EE 应用程序创建的 JAR 文件是 EAR 文件 ...
- C#提高-------------------Assembly和Module的使用-------反射内涵
转 :C#反射技术概念作用和要点 反射(Reflection)是.NET中的重要机制,通过放射,可以在运行时获得.NET中每一个类型(包括类.结构.委托.接口和枚举等)的成员,包括方法.属性.事件,以 ...
- (转)simple-framework(MaliSDK框架分析)
出自:http://blog.csdn.net/u013467442/article/details/46940501 simple-framework(Mali SDK框架分析) 1.所有的定义及 ...
- 监听输入框值变化的最佳方案 oninput 和 onpropertychange (实时监控文本框改变的最佳方案)
公司有个文本框,当输入文字/粘贴/复制 或者是键盘猛按的时候,都希望这个文本框能统计出 输入了多少字 这种用 onchange onkeyup onkepress 都不怎么好使 最后在 ...
- Redis 缓存 + Spring 的集成示例(转载)
1. 依赖包安装 pom.xml 加入: <dependency> <groupId>org.springframework.data</groupId> < ...
- java注解自定义使用
Java提供了4种注解,专门负责新注解的创建: @Target: 表示该注解可以用于什么地方,可能的ElementType参数有:CONSTRUCTOR:构造器的声明FIELD:域声明(包括enum实 ...
- MLE、MAP、贝叶斯三种估计框架
三个不同的估计框架. MLE最大似然估计:根据训练数据,选取最优模型,预测.观测值D,training data:先验为P(θ). MAP最大后验估计:后验概率. Bayesian贝叶斯估计:综合模型 ...