美文网首页工具
jupyter 设置不同的 Python 环境

jupyter 设置不同的 Python 环境

作者: 谢小帅 | 来源:发表于2018-04-19 17:23 被阅读28次

    查看我的 python 环境

    $ conda info -e
    # conda environments:
    #
    base                  *  /anaconda3
    caffe2                   /anaconda3/envs/caffe2
    cv                       /anaconda3/envs/cv
    tf                       /anaconda3/envs/tf
    

    比如,想使用 tf 作为 jupyter 启动时的 Python 环境

    1. 首先激活 tf 环境
    $ source activate tf
    
    1. 在 tf 环境下安装 jupyter
    (tf) :~ $ conda install jupyter
    # 最左边 环境名 tf
    
    1. 启动 jupyter
    (tf) :~ $ jupyter notebook
    

    完工!

    感悟:jupyter 如果想使用不同的 Python 环境,就需要在这份 Python 环境下安装一份 jupyter,并且在启动前,先 activate 这个环境。

    相关文章

      网友评论

        本文标题:jupyter 设置不同的 Python 环境

        本文链接:https://www.haomeiwen.com/subject/goawkftx.html