Scarass Scarass - 25 days ago 8
Python Question

How to set other Python interpreter to IPython

Can we change the version of Python interpreter that IPython uses?

I know there is IPython and IPython3, but the problem is, IPython uses Python2.7, and IPython3 uses Python3.4.2, and I see no way to change that.

What if I wanted IPython to use which ever version of Python interpreter I wanted, could I make it that way?

I want IPython to use the newest Python version, Python3.6. Can I make it that way?

Answer Source

It seems I've found the solution.

You need to edit the file which starts IPython. On Linux you can enter it with: sudo nano $(which ipython). Once you're inside the file change the shebang line to what ever Python interpreter you like. And directories that contain Python3.4 modules need to be added to $PYTHONPATH variable.

What is a shebang line? First line in a file that represents the path to python interpreter that will be used.

Thanks to @code_byter.