How to set a default environment for Anaconda / Jupyter?

后端 未结 4 1588
-上瘾入骨i
-上瘾入骨i 2020-12-30 08:02

I have installed Anaconda for my Machine Learning course. I\'m using it as IPython (Jupyter) notebook, in which we have lessons. OS is Ubuntu 14.04 LTS. Basically, I always

相关标签:
4条回答
  • 2020-12-30 08:18

    In your ~/.bashrc, include the line:

    alias jupyter="source activate su_env; jupyter"
    

    This will condense the two commands into one, and you will activate su env whenever you call jupyter notebook or lab or whatever

    0 讨论(0)
  • 2020-12-30 08:25

    Edit your bashrc and add source activate su_env then that env will always be active. To switch back to to root (or any other env) source activate env_name

    0 讨论(0)
  • First activate the conda environment from the command line, then launch the notebook server.

    For example:

    $ source activate env_name
    $ jupyter notebook
    

    Note: This might only work with environments that were created from within Jupyter Notebook, not environments that were created using conda create on the command line.

    0 讨论(0)
  • 2020-12-30 08:32

    You can use this on conda prompt:

    conda activate env_name

    jupyter notebook

    source activate env_name gives me an error: 'source' is not recognized as an internal or external command, operable program, or batch file.

    0 讨论(0)
提交回复
热议问题