Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IPython command not found Terminal OSX. Pip installed

Tags:

Using Python 2.7 installed via homebrew. I then used pip to install IPython. So, IPython seems to be installed under:

/usr/local/lib/python2.7/site-packages/

I think this is true because there is a IPython directory and ipython egg.

However, when I type ipython in the terminal I get:

-bash: ipython: command not found

I do not understand why this ONLY happens with IPython and not with python? Also, how do I fix this? What path should I add in .bashrc? And how should I add?

Currently, my .bashrc reads:

PATH=$PATH:/usr/local/bin/

Thanks!

like image 471
Rohit Avatar asked May 25 '13 02:05

Rohit


People also ask

How do I get Ipython in terminal?

You start IPython by typing “ipython” in your terminal. $ ipython Python 2.7.

How do I fix pip command not found?

A “pip: command not found” error occurs when you fail to properly install the package installer for Python (pip) needed to run Python on your computer. To fix it, you will either need to re-install Python and check the box to add Python to your PATH or install pip on your command line.

How do I use pip in Terminal Mac?

To use the get-pip script to install PIP on Mac: Open the Terminal app via the Launchpad. In the Terminal, type curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py and press Enter. Allow curl time to download the script onto your Mac. Once it's done, type python3 get-pip.py and press Enter.


2 Answers

I had this issue too, the following worked for me and seems like a clean simple solution:

pip uninstall ipython

pip install ipython

I'm running mavericks and latest pip

like image 183
robertwest Avatar answered Oct 24 '22 19:10

robertwest


Check IPython whether is installed by below command:

$python -m IPython 

enter image description here If you got this result as above picture.

Then run this command on terminal and add into ~/.bash_profile file

$alias ipython='python -m IPython' 

So try run "ipython" again on terminal. It works fine for me.

Reference topics:

ipython on MacOS 10.10 - command not found

iPython installed but not found

like image 37
Luna Kong Avatar answered Oct 24 '22 17:10

Luna Kong