I have both Python 2.7 and 3.5 installed. If I run a script from the command line using python
, it uses Python 2.7, but if I launch iPython, it uses Python 3:
kurt@kurt-ThinkPad:~$ python -V
Python 2.7.12
kurt@kurt-ThinkPad:~$ ipython
Python 3.5.2 (default, Sep 10 2016, 08:21:44)
Type "copyright", "credits" or "license" for more information.
IPython 5.1.0 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.
In [1]:
Is there a way to launch iPython so that it uses Python 2? (I'm using Ubuntu LTS 16.04).