IPython command not found Terminal OSX. Pip installed
Solution 1
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
Solution 2
Check IPython whether is installed by below command:
$python -m IPython
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
Solution 3
Create .pydistutils.cfg
in your homedir with following content:
[global]
verbose=1
[install]
install-scripts=$HOME/bin
[easy_install]
install-scripts=$HOME/bin
And then: pip install -U --user ipython
. Of course $HOME/bin
must be in your $PATH
. Packages are going to be installed in $HOME/Library/Python
, so user only, not system wide.
Solution 4
I use pip3 install ipython
is OK.
maybe ipython
rely on python3
Solution 5
Try run brew install ipython
:
then run xcode-select --install
;
run brew install git
,
If you got this result as above picture. Refer to enter link description here
At last, run brew install ipython
Rohit
An Astrophysicist who's getting away from IRAF & IDL and into Python
Updated on January 08, 2021Comments
-
Rohit over 3 years
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!
-
Rohit almost 11 yearsHmm....when I do the pip command as you suggested I get: no such option: --user #I added my account name as user, obviously! Any ideas why the command fails?
-
nudzo almost 11 years
pip
needs to be installed into homedir too. Runeasy_install --user pip
, to got one in your$HOME/bin
and then --user option will be enabled. -
Rohit almost 11 yearsWait, when I try EXACTLY the command you suggested I have the following: pip install -U --user ipython Requirement already up-to-date: ipython in /usr/local/lib/python2.7/site-packages Cleaning up...
-
Rohit almost 11 yearsOK, I did the following: easy_install --user pip Searching for pip Best match: pip 1.3.1 Processing pip-1.3.1-py2.7.egg Adding pip 1.3.1 to easy-install.pth file Installing pip script to /Users/XXXX/bin Installing pip-2.7 script to /Users/XXXX/bin where XXXX is the username. I also have the .pydistutils.cfg file in my home directory and still ipython command is not recognized.
-
nudzo almost 11 yearsThe run again:
pip install -U --user --force ipython
, to get it reinstalled and scripts put in$HOME/bin
. -
Rohit almost 11 yearsYay! That works. Thanks SO MUCH for your patience and perseverance.
-
Rohit about 10 yearsThanks for your answer. I just installed Anaconda and got everything to work.
-
Gravity M over 9 yearsFor some users, doing just
pip install ipython
might give anaccess denied
error. In that case, you need:sudo pip install ipython
-
hlin117 about 8 yearsUsing
pip install -U --user --force ipython
worked through. -
tzaman almost 8 yearsFound this necessary again on El Capitan; thanks for the detailed instructions.
-
braulio over 3 yearsjust had similar issue when updating from Mac OSX Mojave to Catalina and changing to zsh as a standard shell, even in the bash version of it the ipython command was broken, adding alias ipython="python3 -m IPython" to ~/.zshrc fixes it
-
Mike.R over 3 yearsArtem R U Sure?