我也有同樣的問題,但我已經解決了它。
我用默認安裝Anaconda3-4.2.0的Notebook 4.2.3。
$ pyenv versions
system
* anaconda3-4.2.0 (set by /Users/akiyoko/.pyenv/version)
$ pip list | grep notebook
notebook (4.2.3)
從4.3.0開始,出於安全原因運行筆記本服務器時,筆記本會生成令牌。
請參閱https://jupyter-notebook.readthedocs.io/en/latest/security.html#server-security。
PyCharm 2017.2需要筆記本服務器URL的標記,但筆記本4.2.3不支持標記。所以,我把筆記本升級到了4.3。
$ pip install notebook==4.3
$ pip list | grep notebook
notebook (4.3.0)
之後,PyCharm顯示了運行筆記本電腦服務器時,爲下文運行工具窗口筆記本內核:
/Users/akiyoko/.pyenv/versions/anaconda3-4.2.0/bin/python /Users/akiyoko/.pyenv/versions/anaconda3-4.2.0/bin/jupyter-notebook --no-browser --ip 127.0.0.1 --port 8888 --port-retries=0
[I 11:41:22.657 NotebookApp] [nb_conda_kernels] enabled, 2 kernels found
[I 11:41:23.517 NotebookApp] [nb_anacondacloud] enabled
[I 11:41:23.526 NotebookApp] [nb_conda] enabled
[I 11:41:23.661 NotebookApp] ✓ nbpresent HTML export ENABLED
[W 11:41:23.661 NotebookApp] ✗ nbpresent PDF export DISABLED: No module named 'nbbrowserpdf'
[I 11:41:23.669 NotebookApp] Serving notebooks from local directory: /Users/akiyoko/PycharmProjects/jupyter-test
[I 11:41:23.669 NotebookApp] 0 active kernels
[I 11:41:23.669 NotebookApp] The Jupyter Notebook is running at: http://127.0.0.1:8888/?token=e0393bd13f97aa6408607df24a7c13b6341d80e841d0c8ad
見https://www.jetbrains.com/help/pycharm/running-ipython-jupyter-notebook-cells.html。
它工作。
感謝您的信息 – Mysterio