Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ipython on MacOS 10.10 - command not found

I'm trying to get ipython working in Mac OS 10.10.

problem:

$ ipython

returns

-bash: ipython: command not found

context:

I'm running python2.7 on MacOS 10.10. I installed python via brew. Some info:

which python =

/usr/local/bin/python

brew info python =

python: stable 2.7.10 (bottled), HEAD
Interpreted, interactive, object-oriented programming language
https://www.python.org
/usr/local/Cellar/python/2.7.10_2 (4977 files, 77M) *

To install ipython I ran

pip install ipython[all]

so... pip show ipython =

---
Metadata-Version: 2.0
Name: ipython
Version: 4.0.0
Summary: IPython: Productive Interactive Computing
Home-page: http://ipython.org
Author: The IPython Development Team
Author-email: [email protected]
License: BSD
Location: /usr/local/lib/python2.7/site-packages
Requires: traitlets, pickleshare, simplegeneric, decorator, gnureadline, appnope, pexpect

finally, echo $PATH =

/Users/[username]/depot_tools:/usr/local:/usr/local/lib:/Users/[username]/depot_tools:/usr/local:/usr/local/lib:/usr/local/lib/python2.7/site-packages:/Users/[username]/depot_tools:/usr/local:/usr/local/lib:/usr/local/git/current/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/X11/bin

Can anyone tell me what I'm doing wrong?

like image 712
dseeley Avatar asked Sep 30 '15 01:09

dseeley


People also ask

How do I enable IPython in terminal?

To start a Python interactive session, just open a command-line or terminal and then type in python , or python3 depending on your Python installation, and then hit Enter .

Is IPython installed with Python?

Installing IPython itself Given a properly built Python, the basic interactive IPython shell will work with no external dependencies.

Does Jupyter install IPython?

The Jupyter Notebook and other frontends automatically ensure that the IPython kernel is available. However, if you want to use a kernel with a different version of Python, or in a virtualenv or conda environment, you'll need to install that manually.


Video Answer


2 Answers

I met the same issue but resolved. You need to make sure install IPython at first via this command on terminal.

$python -m IPython

Then it will show this result: enter image description here

Congratulations! You had IPython in your computer.

Then run this command on terminal.

alias ipython='python -m IPython'

Finally you can try ipython command again.

You can add this command line into ~/.bash_profile file for permanent. It works fine for me.

like image 134
Luna Kong Avatar answered Oct 24 '22 01:10

Luna Kong


I was trying to install jupyter with 'pip install jupyter'. http://jupyter.readthedocs.org/en/latest/install.html

Then I got similar error on running ipython. I did try all solutions on Stackoverflow about installing ipython.

At last, I installed Anaconda then run conda install jupyter. Now everything works fine.

My environment:

  1. Python 2.7
  2. Mac OS X El Capitan
like image 3
Jack Fan Avatar answered Oct 24 '22 03:10

Jack Fan