Use IPython from PyPy3

less than 1 minute read

After installing PyPy3, use IPython with PyPy3 as the kernel by:

  1. install IPython in PyPy3:
    pypy3 -m pip install ipython
    
  2. create a file on your PATH, perhaps under ~/.local/bin/pypy3-ipython:
    #!/usr/bin/env pypy3
    import re
    import sys
    
    from IPython import start_ipython
    
    if __name__ == '__main__':
        sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
        sys.exit(start_ipython())
    

Now you should be able to type in Terminal

pypy3-ipython

to use IPython with the PyPy3 kernel.

Reference

Leave a comment