Linux下安装ipython与jupyter

IPython从Python发展而来,更倾向于科学计算。互联网数据分析更喜欢用。

首先切换root用户:

su - root

pip3自动安装ipython

[root@hear ~]# ipython
Python 3.6.7 (default, Dec 3 2018, 10:45:52)
Type 'copyright', 'credits' or 'license' for more information
IPython 7.2.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: 1
Out[1]: 1

In [2]:

 安装jupyter notebook

 
1.激活虚拟环境venv
2. pip3 install ipython
  pip3 install jupyter
3. ipython进入
  from IPython.lib import passwd
  passwd()#生成密码
4.jupyter notebook --generate-config --allow-root
5. vim ~/.jupyter/jupyter_notebook_config.py

    修改如下配置一致即可,去掉注释符 # 才能读取代码

    c.NotebookApp.ip = '建议写当前linux机器的ip地址'
    c.NotebookApp.open_browser = False
    c.NotebookApp.port = 8000

6.jupyter notebook  --allow-root  #启动notebook
 
原文地址:https://www.cnblogs.com/caodneg7/p/10058989.html