Remote Access Ipython Notebook

Source: Internet
Author: User
Tags virtual environment jupyter
Ipython notebook is run by default in http://localhost:8888/, only native access target: Running Ipython notebook on the server, accessing in the local browser

Server operating system CENTOS7, development environment Python 2.7 Local Mac OS

1. Install $ pip Install Ipython[notebook]
$ Ipython Notebook
If the error "Importerror:no module named Notebookapp", then $ pip install Jupyter

Bug under virtual env My Python development environment is virtual env, and the path is still jupyter in ~/env2.7, "Importerror:no module named Notebookapp" (env 2.7) $ which Python ~/env2.7/bin/ipython Jupyter installed in the virtual environment, Ipython also in the virtual environment, somehow, the start of the Ipython is to go to the global search, of course, can not find that forced to start virtual Ipython under ENV (ENV 2.7) $ ~/env2.7/bin/ipython Notebook

2, in the server run Ipython notebook $ ipython Notebook--no-browser--port=8889
3, network configuration CENTOS7 under the open port $ sudo systemctl status Firewalld $ sudo firewall-cmd--zone=public--add-port=8889/tcp in  Local new tunnel $ ssh-n-f-l localhost:8888:localhost:8889 User@remotehost-n tells SSH not to execute remote command, for port forwarding---f to allow SSH background to run, or not to set-F, foreground run-l List port forwarding configuration, remote port 8889-> Local Port 8888
4. Local Access Open Browser http://127.0.0.1:8888/create a new notebook
Most simply, import the famous Iris dataset from the Sklearn
or import it from the Seaborn.

5, remote drawing attention to the data visualization is often used to matplotlib and Seaborn Server no display in the notebook import Matplotlib.pyplot as plt will be reported "Importerror:no Modul E named Tkinter "wrong, then $sudo yum install Tkinter
Next, the report "Tclerror:no display name and no $DISPLAY environment variable" error before the import, plus%matplotlib inline

6, close the tunnel manually find and kill $ps Aux|grep 8889
Reference links https://coderwall.com/p/ohk6cg/remote-access-to-ipython-notebooks-via-ssh

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.