推荐学习书目
› Learn Python the Hard Way
Python Sites
› PyPI - Python Package Index
› http://diveintopython.org/toc/index.html
› Pocoo
值得关注的项目
› PyPy
› Celery
› Jinja2
› Read the Docs
› gevent
› pyenv
› virtualenv
› Stackless Python
› Beautiful Soup
› 结巴中文分词
› Green Unicorn
› Sentry
› Shovel
› Pyflakes
› pytest
Python 编程
› pep8 Checker
Styles
› PEP 8
› Google Python Style Guide
› Code Style from The Hitchhiker's Guide
whoops
V2EX  ›  Python

ubuntu 下把 jupyter notebook 加入到/etc/rc.local 随系统启动, Anconda 无法被 jupyter notebook 使用。

  •  
  •   whoops · Jul 13, 2019 · 2996 views
    This topic created in 2632 days ago, the information mentioned may be changed or developed.
    每次启动 jupyter notebook 使用的还是系统自带的 python3
    我运行
    import sys
    for line in sys.path:
    print(line)
    输出结果是:
    /usr/lib/python36.zip
    /usr/lib/python3.6
    /usr/lib/python3.6/lib-dynload

    /usr/local/lib/python3.6/dist-packages
    /usr/lib/python3/dist-packages
    /usr/local/lib/python3.6/dist-packages/IPython/extensions
    /root/.ipython



    如果 ssh 登录进去运行 jupyter notebook --allow-root
    再远程访问使用的就是我安装的 anconda
    再运行上面的代码输出是
    /var/jupyter_nb
    /root/anaconda3/lib/python37.zip
    /root/anaconda3/lib/python3.7
    /root/anaconda3/lib/python3.7/lib-dynload

    /root/anaconda3/lib/python3.7/site-packages
    /root/anaconda3/lib/python3.7/site-packages/IPython/extensions
    /root/.ipython

    不知需要怎么设置才能每次让 jupyter notebook 系统自动重启加载后使用 Anconda 而不是系统自带的 python3,请教大家了。
    5 replies  •  2019-07-13 22:48:25 +08:00
    aaronzjw
        1
    aaronzjw  
       Jul 13, 2019   ❤️ 1
    systmctl 了解一下
    encro
        2
    encro  
       Jul 13, 2019   ❤️ 1
    建议 supervisord
    encro
        3
    encro  
       Jul 13, 2019   ❤️ 1
    先 source /root/anaconda3/bin/activate ?
    whoops
        4
    whoops  
    OP
       Jul 13, 2019
    谢谢楼上各位,我试一下
    whoops
        5
    whoops  
    OP
       Jul 13, 2019
    systmctl 搞定了,再次谢谢楼上两位
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2696 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 06:35 · PVG 14:35 · LAX 23:35 · JFK 02:35
    ♥ Do have faith in what you're doing.