centos6.5 installation Jupyter__hadoop

Source: Internet
Author: User
Tags sha1 jupyter jupyter notebook

1. First install the Python base environment

anaconda2-4.1.1-linux-x86_64.sh

installation directory Select /usr/local/anaconda2 2. Add soft connections, modify Python version

Ln-s/usr/local/anaconda2/bin/python python 3. Modify Yum Dependent configuration

Vim/usr/bin/yum

Put the first line of the #. /usr/bin/python changed into #. /usr/bin/python2.6 on it . 4. Modify environment variables (default has been modified, best to verify)

Vim/etc/profile

Exportpath= $PATH:/usr/local/anaconda2/lib:/usr/local/anaconda2/lib/python2.7/site-packages:/usr/local/ Anaconda2/bin 5. Install Jupyterlab (Install the latest version)

Pip Install Jupyterlab

Jupyter serverextension enable--py Jupyterlab--sys-prefix

If the PIP does not recognize the soft connection of the PIP Ln-s/usr/local/anaconda2/bin/pip pip 6. Modify handlers.py Otherwise you cannot run Jupyter (do not set boot on the terminal jupyter Notebook times 404 error)

vim/usr/local/anaconda2/lib/python2.7/site-packages/notebook/base/handlers.py

Perform/headers[find the place to be modified

Comment out the following two lines

# if ' Content-security-policy ' not in headers:

#headers ["content-security-policy"] = Self.content_security_policy

If still not, turn off the Jupyter interface, kill the Jupyter process, clear the cache, refresh the Edu page, and re-enter.

Sometimes you can't find two lines of code that need to be commented because of the notebook installation version, you can just comment out this line of code

#headers ["Content-security-policy"]= self.content_security_policy 7. Configure boot Jupyternotebook (logon via token if not configured) 1. Generate Configuration file

[root@8734d9814dd1/]# jupyter notebook--generate-config --allow-root

writing default Config to:/root/.jupyter/jupyter_notebook_config.py 2. Generate password, put SHA1 ... Password copied down

[Root@6038af9bfbbe bin]# Ipython

Python 2.7.14 | Anaconda, inc.| (Default, Oct 16 2017,17:29:19)

Type "Copyright", "credits" or "license" for the more information.

IPython 5.4.1--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.authimport passwd

In [2]: passwd ()

Enter password:111111

Verify password:111111

OUT[2]: ' sha1:7a79f215c9f0:5a2fb1e4a1043557c903a2854bf34125a8f62092 '

In [3]: 3. Modifying a configuration file

vi/root/.jupyter/jupyter_notebook_config.py

c.notebookapp.ip= ' * '

C.notebookapp.password = U ' sha1:7a79f215c9f0:5a2fb1e4a1043557c903a2854bf34125a8f62092 '

C.notebookapp.open_browser = False

C.notebookapp.port =8888

4. Start Jupyter Notebook

[Root@6038af9bfbbe/]# jupyter Notebook

[W 22:17:52.208 notebookapp]warning:the Notebook server is listening to all IP addresses and not usingencryption. This isn't recommended.

[I 22:17:52.271 notebookapp]jupyterlab Alpha Preview extension loaded from/usr/local/anaconda2/lib/python2.7/ Site-packages/jupyterlab

Jupyterlab v0.27.0

known labextensions:

[I 22:17:52.275 notebookapp]running the core application with no additional extensions or settings

[C 22:17:52.279 notebookapp]running as root not recommended. Use--allow-root to bypass.

5. access to http://yourip:8888/through the browser, password for the previous set of password 111111

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

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.