• CentOS 安装Anaconda+Jupyter


    linux服务器安装anaconda:

    1.1 下载安装脚本:
    wget https://repo.anaconda.com/archive/Anaconda3-5.2.0-Linux-x86_64.sh (不过建议去清华源下载)

    1.2 运行安装向导:
    bash Anaconda3-5.2.0-Linux-x86_64.sh

    1.3 确认是否安装成功:
    conda --version (安装完重启或者source ~/.bashrc)

    linux服务器配置juypter,然后远程使用jupyter:

    1. 进入环境ipython, 在ipython环境下输入:

    from notebook.auth import passwd
    passwd()

    # 输入方便你记的密码,连续输;两次..输完密码后,会输出一个字符串,形如: ’sha1:9e7a5c5e0a29:8cbdvsv2344d141c92beab1c5bc6e9avsdvdsvsv’
    # 将其保存下来, 完成以上操作后,通过exit()推出ipython环境

    2. 进入到安装目录:cd /root/anaconda3/etc/jupyter, 执行 :
    jupyter notebook --generate-config
    #(命令会产生文件:/root/.jupyter/jupyter_notebook_config.py)

    3. 编辑配置文件,编辑此文件,写入
    c.NotebookApp.ip = '*' # 允许访问此服务器的 IP,星号表示任意 IP
    c.NotebookApp.password = u'sha1:xxx:xxx' # 之前生成的密码 hash 字串
    c.NotebookApp.open_browser = False # 运行时不打开本机浏览器
    c.NotebookApp.port = 1111 # 使用的端口,随意设置
    c.NotebookApp.enable_mathjax = True # 启用 MathJax

    4. 启动服务
    Jupyter notebook

  • 相关阅读:
    【转】织梦为栏目添加图片的方法
    写在php设计模式前
    memcache 开机启动
    php 列出当前目录
    print echo 的区别
    php 报错等级
    nginx 启动脚本
    centos 编译 安装php
    修改linux iptable规则
    linux yum 安装软件
  • 原文地址:https://www.cnblogs.com/cassielcode/p/12639870.html
Copyright © 2020-2023  润新知