How to know which is running in Jupyter notebook?

后端 未结 5 770
长发绾君心
长发绾君心 2020-12-04 15:59

I use Jupyter notebook in a browser for Python programming, I have installed Anaconda (Python 3.5). But I\'m quite sure that Jupyter in running my python commands with the n

5条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-04 16:51

    Assuming you have the wrong backend system you can change the backend kernel by creating a new or editing the existing kernel.json in the kernels folder of your jupyter data path jupyter --paths. You can have multiple kernels (R, Python2, Python3 (+virtualenvs), Haskell), e.g. you can create an Anaconda specific kernel:

    $ /bin/python3 -m ipykernel install --user --name anaconda --display-name "Anaconda"
    

    Should create a new kernel:

    /kernels/anaconda/kernel.json

    {
        "argv": [ "/bin/python3", "-m", "ipykernel", "-f", "{connection_file}" ],
        "display_name": "Anaconda",
        "language": "python"
    }
    

    You need to ensure ipykernel package is installed in the anaconda distribution.

    This way you can just switch between kernels and have different notebooks using different kernels.

提交回复
热议问题