• Linux029Python Anaconda 3 安装 jupyter notebook


     首先创建工作目录

    # 创建工作目录
    mkdir /apps/python-ana3 chown fanfengping.root /apps/python-ana3/

    执行如下命令,使用 conda 安装 jupyter notebook

    # 使用 conda 安装 jupyter notebook
    conda install jupyter notebook

    进入ipython环境,生成密码 

    from notebook.auth import passwd
    passwd()

    记录上述生成的密码。

    使用如下命令生成配置文件。

    # 生成配置文件
    jupyter notebook --generate-config

    修改配置文件,修改如下所示的配置项,并保存。

    使用如下命令启动 jupyter notebook

    jupyter notebook --allow-root

    上述命令无法后台运行,可通过如下命令后台运行

    nohup jupyter notebook --allow-root >> jupyter-notebook.log 2>&1 &

    启动后,即可通过链接访问,输入正确的密码,即可成功登录。如下所示:

    通过如下所示命令,将配置的端口开放,方便其他主机访问

    systemctl start firewalld
    firewall-cmd --zone=public --add-port=9091/tcp --permanent
    firewall-cmd --reload
  • 相关阅读:
    Python 循环嵌套
    python 通过序列索引迭代
    Python for 循环语句
    python 无限循环
    Python 循环语句
    Python 条件语句
    Python运算符优先级
    Python身份运算符
    Python成员运算符
    Python逻辑运算符
  • 原文地址:https://www.cnblogs.com/fengpingfan/p/15852788.html
Copyright © 2020-2023  润新知