0

He everyone,

I recently had a harddrive corruption. Luckily I had all my files backed up by the online service CrashPlan.

This program only grabs files from the /users/username director, so when I restored my computer after reformatting my harddrive, I just made sure that the user file that was restored was the admin user on the computer and viola, everything was (almost) back to normal.

I was unable to start up my ipython, so I tried a pip-install. Turns out my pip was also gone (weird), so I redownloaded pip. Then when trying to install ipython I ran into a roadblock, which was solved by this post

However, when I try to start up ipython or ipython notebook from the command line, I get this error:

biot21-159-dhcp:Downloads kevin$ ipython
-bash: ipython: command not found

I tried booting up a new terminal session--no luck. Any ideas?

BTW, I'm running a late 2011 macbook pro with OSX 10.11 (ElCapitan)


EDIT: so doing a reinstall of python using homebrew brew install python and then using pip install ipython did the job. Interestingly, I no longer have to add --user python after the pip statement. I don't know enough to answer why that is, but maybe someone out there that knows more could?

Community
  • 1
  • 1
lstbl
  • 527
  • 5
  • 17
  • 1
    Re: why you don't need `--user python` after brew-installing python; The reason is that you don't need special permissions to use pip when you're not using the built-in Python that comes with El Capitan. You can read more on it here: http://apple.stackexchange.com/questions/209572/how-to-use-pip-after-the-el-capitan-max-os-x-upgrade – fredrik Apr 14 '16 at 20:58

1 Answers1

2

I don't think those binaries are stored in your /users/<username> directory, unfortunately. So you'll need to re-install those from scratch.

I would recommend you install those applications using homebrew and that includes installing Python through brew as well, rather than tacking stuff onto the OS-bundled Python.

brew install python

Python will then install into e.g. /usr/local/Cellar/python/2.7.10_2/bin/python

Then use pip which you'll get bundled with the brew-installed Python, and which you can use to pip install ipython. Just make sure you're executing /usr/local/Cellar/python/2.7.10_2/bin/pip in this case:

/usr/local/Cellar/python/2.7.10_2/bin/pip install ipython

However, depending on your use case, you might want to consider installing ipython into a virtualenv.

Edit: As mentioned in my comment to your question, you can read more here about why you should probably leave the OS-bundled Python alone in OS X.

Community
  • 1
  • 1
fredrik
  • 9,631
  • 16
  • 72
  • 132
  • But I did reinstall ipython just now. IPython is still not booting up... Maybe I am misinterpreting your comment? – lstbl Apr 14 '16 at 20:39