I have always wondered if it were possible to run PyPy in the Jupyter notebook. I recently tried installing PyPy on my local machine, and it ran really well - 100X speedup in an agent-based simulation written in pure Python. However, I miss the interactivity in the Jupyter notebook. Is it possible to make the IPython kernel use PyPy rather than CPython?
Provided you have a system-wide / user installation of jupyter
. You can follow:
pypy3 -m venv PyPy3
source PyPy3/bin/activate
pypy3 -m pip install ipykernel
ipython kernel install --user --name=PyPy3
Now exit the virtual environment and verify installation:
jupyter kernelspec list
Open Jupyter notebook or lab interface.