Reputation: 4564
iPython 3 — installed with pip3
and located at /usr/local/bin/ipython3
— runs with Python 2.7.6 in both the console and notebook whereas I want it to run with Python 3 as it should.
This used to work fine before, but I may have reinstalled stuff using MacPorts or HomeBrew that triggered the change.
$ which -a python
/opt/local/bin/python # 2.7.9
/usr/local/bin/python # 2.7.8
/usr/local/bin/python
$ which -a python2
/usr/local/bin/python2 # 2.7.8
/usr/local/bin/python2
$ which -a python3
/usr/local/bin/python3 # 3.2.4
/usr/local/bin/python3
$ pip3 -V
pip 1.5.6 from /usr/local/lib/python3.4/site-packages (python 3.4)
$ ipython3 -V
2.3.1
Upvotes: 1
Views: 2505
Reputation: 21
what work for me is changing #!/usr/bin/python to #! /usr/bin/python3 in file /usr/local/bin/ipython3
Just make sure that above address in all files coming out from 'whereis ipython3
' should be same.
Upvotes: 0
Reputation: 4564
I edited the shebang on the iPython executable from #!/usr/bin/python
to #/usr/local/bin/python3
, but I am not sure if this is a hacky or bad solution.
Upvotes: 3