• ipython安装 设置快速启动


    pip3 install ipython

    #找到安装的目录

    find / -name ipython

    /usr/local/python37/bin/ipython

    #增加快速快捷

    vim ~/.bashrc

    增加

    alias ipython3='python37 /usr/local/python37/bin/ipython'

    source ~/.bashrc

    安装jupyter notebook

    pip3 install anaconda

    pip3 install conda

    pip3 install jupyter

    如何配置环境变量

    vim /etc/profile

    export PATH=$PATH:/usr/local/python37/bin

    source /etc/profile

    执行jupyter notebook报错:

    yum install -y sqlite-devel

    然后回到python安装目录,重新编译安装

    make && make install

     创建jupyter notebook server 可以远程访问

    官网指南

    1. 生成一个 notebook 配置文件

    需要生成一个配置文件

    文件不存在,需要自行创建

    • Linux: /home/USERNAME/.jupyter/jupyter_notebook_config.py

    mkdir .jupyter/

    touch jupyter_notebook_config.py

    使用

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

    2. 生成密码

    设置密码:jupyter notebook password,生成的密码存储在 jupyter_notebook_config.json

    $ jupyter notebook password
    Enter password:  ****
    Verify password: ****
    [NotebookPasswordApp] Wrote hashed password to /Users/you/.jupyter/jupyter_notebook_config.json

    3、修改配置

    在 jupyter_notebook_config.py 中找到下面的行,取消注释并修改。

    c.NotebookApp.ip='*'
    c.NotebookApp.password = u'sha:ce...刚才复制的那个密文'
    c.NotebookApp.open_browser = False
    c.NotebookApp.port =8888 #可自行指定一个端口, 访问时使用该端口

    以上设置完以后就可以在服务器上启动 jupyter notebook,jupyter notebook, root 用户使用 jupyter notebook --allow-root。打开 IP:指定的端口, 输入密码就可以访问了。

    参考:https://blog.csdn.net/simple_the_best/article/details/77005400

  • 相关阅读:
    并发编程的艺术
    Redis字符串实现,SDS与C的区别,空间预分配
    Jvm
    Redis数据结构的实现
    发一篇感谢身边的所有从事it工作的朋友
    BeanFactory 默认的注入实现类DefaultListableBeanFactory
    jsSwitch语句优化
    彻底搞懂 Nginx 的五大应用场景
    Spring Boot 整合 Quartz 轻松实现任务调度!
    js计算两个给定日期之间的天数
  • 原文地址:https://www.cnblogs.com/superniao/p/10563942.html
Copyright © 2020-2023  润新知