推荐学习书目
› 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 · 3153 views
  •   You need to sign in to view this topic
    This topic created in 2687 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
    aaronzjw
    Jul 13, 2019❤️1
    1
    systmctl 了解一下
    encro
    encro
    Jul 13, 2019❤️1
    2
    建议 supervisord
    encro
    encro
    Jul 13, 2019❤️1
    3
    先 source /root/anaconda3/bin/activate ?
    whoops
    whoops
    OP
    Jul 13, 2019
    4
    谢谢楼上各位,我试一下
    whoops
    whoops
    OP
    Jul 13, 2019
    5
    systmctl 搞定了,再次谢谢楼上两位
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   912 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 21:41 · PVG 05:41 · LAX 13:41 · JFK 16:41
    ♥ Do have faith in what you're doing.