2017-05-31 91 views
1

我使用Anaconda installer安裝了python,很高興地使用它附帶的Jupyter版本。我也下載了(32-bit) windows version of pypy,並且在命令行中工作正常。如何在Windows中使用pypy作爲CPython Jupyter中的內核?

如何獲得CPython Jupyter在運行我的python代碼時使用pypy作爲內核?

+0

你在找這樣的東西嗎?https://www.reddit.com/r/Python/comments/56nnqe/pypy_with_cpython_35_running_jupyter_notebook_not/ –

+0

@MattiLyra排序除了我希望它只是內核應該比什麼更容易那個人實現了。 – eleanora

+0

查看這個列表(https://github.com/jupyter/jupyter/wiki/Jupyter-kernels)它似乎沒有任何人已經實現過,所以你可能必須把你自己的'pypy'內核放在一起案件。 http://jupyter-client.readthedocs.io/en/latest/kernels.html –

回答

1

通過查看這個列表(github.com/jupyter/jupyter/wiki/Jupyter-kernels),它似乎沒有任何人已經實現過,所以你可能必須把你自己的pypy內核放在一起。 jupyter-client.readthedocs.io/en/latest/kernels.html

+0

PyPy不需要不同的內核;它可以使用ipykernel,這是用於CPython的相同內核。 – cge

1

Pypy不需要不同的內核,它只能使用ipykernel。因此它不在Jupyter內核列表中單獨列出。

您可以使用與installing kernels for different Python environments相同的方法爲pypy安裝內核。例如,

pypy -m pip install ipykernel 
pypy -m ipykernel install --user --name pypy --display-name "PyPy" 

或者

pypy3 -m pip install ipykernel 
pypy3 -m ipykernel install --user --name pypy3 --display-name "PyPy3" 

額外的選項就在那裏,以便有針對內核有用的名稱。

但是,請注意,iPython 6不支持Python 2.7,所以如果您不使用PyPy3,則需要在PyPy中安裝iPython 5(我認爲它仍然可以與最新的Jupyter一起使用,但是)。

相關問題