2

Trying to run ipython after installing via pip causes:

$ ipython
    -bash: ipython: command not found

Do I need to add a directory to my path? The python installation guide doesn't mention it:

http://ipython.org/install.html

Everything seems to be installed as expected:

$ 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: /Library/Python/2.7/site-packages
Requires: traitlets, pickleshare, simplegeneric, decorator, gnureadline, appnope, pexpect

I'm currently using python version 2.7.10 on Mac OS X 10.11

EDIT:

I've tried uninstalling and re-installing and now I'm getting this error:

sudo -H pip install ipython
Collecting ipython
  Downloading ipython-4.0.0-py2-none-any.whl (730kB)
    100% |████████████████████████████████| 733kB 459kB/s 
Requirement already satisfied (use --upgrade to upgrade): traitlets in /Library/Python/2.7/site-packages (from ipython)
Requirement already satisfied (use --upgrade to upgrade): pickleshare in /Library/Python/2.7/site-packages (from ipython)
Requirement already satisfied (use --upgrade to upgrade): simplegeneric>0.8 in /Library/Python/2.7/site-packages (from ipython)
Requirement already satisfied (use --upgrade to upgrade): decorator in /Library/Python/2.7/site-packages (from ipython)
Requirement already satisfied (use --upgrade to upgrade): gnureadline in /Library/Python/2.7/site-packages (from ipython)
Requirement already satisfied (use --upgrade to upgrade): appnope in /Library/Python/2.7/site-packages (from ipython)
Requirement already satisfied (use --upgrade to upgrade): pexpect in /Library/Python/2.7/site-packages (from ipython)
Requirement already satisfied (use --upgrade to upgrade): ipython-genutils in /Library/Python/2.7/site-packages (from traitlets->ipython)
Requirement already satisfied (use --upgrade to upgrade): path.py in /Library/Python/2.7/site-packages (from pickleshare->ipython)
Requirement already satisfied (use --upgrade to upgrade): ptyprocess>=0.5 in /Library/Python/2.7/site-packages (from pexpect->ipython)
Installing collected packages: ipython
Exception:
Traceback (most recent call last):
  File "/Library/Python/2.7/site-packages/pip-7.1.2-py2.7.egg/pip/basecommand.py", line 211, in main
    status = self.run(options, args)
  File "/Library/Python/2.7/site-packages/pip-7.1.2-py2.7.egg/pip/commands/install.py", line 311, in run
    root=options.root_path,
  File "/Library/Python/2.7/site-packages/pip-7.1.2-py2.7.egg/pip/req/req_set.py", line 646, in install
    **kwargs
  File "/Library/Python/2.7/site-packages/pip-7.1.2-py2.7.egg/pip/req/req_install.py", line 803, in install
    self.move_wheel_files(self.source_dir, root=root)
  File "/Library/Python/2.7/site-packages/pip-7.1.2-py2.7.egg/pip/req/req_install.py", line 998, in move_wheel_files
    isolated=self.isolated,
  File "/Library/Python/2.7/site-packages/pip-7.1.2-py2.7.egg/pip/wheel.py", line 371, in move_wheel_files
    clobber(source, dest, False, fixer=fixer, filter=filter)
  File "/Library/Python/2.7/site-packages/pip-7.1.2-py2.7.egg/pip/wheel.py", line 310, in clobber
    ensure_dir(destdir)
  File "/Library/Python/2.7/site-packages/pip-7.1.2-py2.7.egg/pip/utils/__init__.py", line 71, in ensure_dir
    os.makedirs(path)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 150, in makedirs
    makedirs(head, mode)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 150, in makedirs
    makedirs(head, mode)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 157, in makedirs
    mkdir(name, mode)
OSError: [Errno 1] Operation not permitted: '/System/Library/Frameworks/Python.framework/Versions/2.7/share'

I guess this error may have happened the first time around, as it still thinks it has been installed properly!

6
  • Did you face any error while installing IPython ? Commented Oct 6, 2015 at 19:03
  • No I did not get any errors. Seems to be installed according to the pip show command Commented Oct 6, 2015 at 19:22
  • johnlaudun.org/20130902-ipython-command-not-found can u try this ? Commented Oct 6, 2015 at 19:28
  • I researched that page earlier, but I do not have the port command either. Commented Oct 6, 2015 at 19:31
  • This has been extremely painful for me. Please post if you've found a solution. I've been trying to use pip install --target, but it's a very very confusing alley to go down. Commented Nov 22, 2015 at 21:09

1 Answer 1

1

I got same problem. When you uninstall and reinstall ipython, the error happens because of permission. You can delete the directory and reinstall by "sudo pip install ipython". I don't know why but it installs in 'usr/local/bin' instead of 'usr/bin'. I have to use "sudo ipython" to run it.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.