Home  >  Article  >  Backend Development  >  Introduction to the basic usage of iPython and notevook

Introduction to the basic usage of iPython and notevook

高洛峰
高洛峰Original
2017-03-04 17:22:031357browse

1 Ipython installation

pip install ipython

2 Notebooke basic usage

Start ipython and use ipython

Start notebook and use ipython notebook

3 Configuration method for remote use of Ipython notebook

3.0 Create a remote service

Syntax: ipython profile create 08647226a7d78639d2928a500ec3fe69

e.g.:

# ipython Profile Create MyServer

# This will output the file location generated by the terminal at this time, please remember this location

#########################################Q ##### 3.1 Configure openssl authentication############ openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout mycert.pem -out mycert.pem##### ####### At this time, the value of the generated SHA will be output, please remember the output ############ This is to facilitate future use: at this time, you can move the Mycert.pem certificate to ipython notebook folder to put related things together. ############ mv mycert.pem .ipython###### ########### 3.2 Modify the configuration file######
c = get_config()

# Kernel config
c.IPKernelApp.pylab = 'inline'  # if you want plotting support always

# Notebook config
c.NotebookApp.certfile = u'/home/XXX/.ipython/mycert.pem' ##认证的位置
c.NotebookApp.ip = '*'
c.NotebookApp.open_browser = False
c.NotebookApp.password = u'sha1:XXXX' ## 认证输出的sha值
# It's a good idea to put it on a known, fixed port
c.NotebookApp.port = 9999
### ###3.3 Restart ubuntu and start the ipython notebook server############ipython notebook --profile=nbserver############3.4 Remote connection to Ipython NoteBook# ########### Just open the local browser to access the remote noteBook address, remember the port number is 9999###############More basic usage of iPython and notevook Please pay attention to the PHP Chinese website for related articles! ###
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn