Learn Python with me. Second, development tools Jupyter notebook installation and remote access settings

Source: Internet
Author: User
Tags sha1 jupyter jupyter notebook
        Install Jupyter notebook******

The first step: Install the Ipython, after the installation completes enters Ipython, the following figure, enters exit may exit
Pip Install Ipython

Step Two: Install Jupyter
Pip Install Jupyter

Step Three: Configure the environment to access Jupyter notebook remotely

1, Jupyter notebook--generate-config

If you receive the following prompts, add –allow-root after the previous command
Jupyter Notebook–generate-config–allow-root

[C 09:07:26.948 Notebookapp] Running as root is not recommended. Use–allow-root to bypass.

2, generate login password This step is actually not used, because in the virtual machine environment is not recommended password login, modify the configuration file when the password recommended shielding, if the cloud host is still necessary
Open Ipython and create a ciphertext password:

[Root@localhost ~]# Ipython

Python 3.5.2 (default, Aug  4 2017, 02:13:48) 
Type ' copyright ', ' credits ' or ' lice NSE ' for the more information
IPython 6.1.0--a enhanced Interactive Python. Type '? ' for help.

In [1]: From Notebook.auth import passwd in
[2]: passwd ()
Enter password: 
Verify password: 
out[2]: ' SHA1 : 5311cd8b9da9:70dd3321fccb5b5d77e66080a5d3d943ab9752b4 '

Step Fourth: Modify the configuration file generated in the first step, modify the following addresses, and remove the # before the line to take effect
vi/root/.jupyter/jupyter_notebook_config.py or
VI ~/.jupyter/jupyter_notebook_config.py

c.notebookapp.ip= ' * '
c.notebookapp.password = U ' sha1:5311cd8b9da9:70dd3321fccb5b5d77e66080a5d3d943ab9752b4 '
c.notebookapp.open_browser = False
c.notebookapp.port =8888    #随便指定一个端口, using default 8888 can

also Fifth step: Access to Jupyter notebook
now open the service under the command line to see which port the system specifies, possibly 8889
jupyter notebook  --ip=0.0.0.0--no-browser --allow-root

Open firewall Browser, enter http://192.168.1.100:8889 This address is the virtual machine system IP address, if found inaccessible, generally CentOS system firewall is not closed, use the following command to shut down

1. Close firewall:
systemctl stop firewalld.service #停止firewall
systemctl Disable Firewalld.service # Disable firewall boot
firewall-cmd--state #查看默认防火墙状态 (show notrunning after shutdown, show running after opening)

Access again, the following interface appears, the description can be normal access!

Enter the password you set before you can log in ... Congratulations ...

Small example: Use Jupyter notebook to practice a 99 multiplication table.

Next announcement: Installation and remote access settings for integrated development tools Pycharm

Related Article

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.