3

I just did the following with no problem:

brew install python3

pip3 install numpy

pip3 install scipy

But when trying:

pip3 install ipython

I get:

Exception:
  Traceback (most recent call last):
    File "/usr/local/Cellar/python3/3.4.2_1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pip-6.0.6-py3.4.egg/pip/basecommand.py", line 232, in main
      status = self.run(options, args)
    File "/usr/local/Cellar/python3/3.4.2_1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pip-6.0.6-py3.4.egg/pip/commands/install.py", line 347, in run
      root=options.root_path,
    File "/usr/local/Cellar/python3/3.4.2_1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pip-6.0.6-py3.4.egg/pip/req/req_set.py", line 549, in install
      **kwargs
    File "/usr/local/Cellar/python3/3.4.2_1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pip-6.0.6-py3.4.egg/pip/req/req_install.py", line 751, in install
      self.move_wheel_files(self.source_dir, root=root)
    File "/usr/local/Cellar/python3/3.4.2_1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pip-6.0.6-py3.4.egg/pip/req/req_install.py", line 960, in move_wheel_files
      isolated=self.isolated,
    File "/usr/local/Cellar/python3/3.4.2_1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pip-6.0.6-py3.4.egg/pip/wheel.py", line 374, in move_wheel_files
      maker.make_multiple(['%s = %s' % kv for kv in console.items()])
    File "/usr/local/Cellar/python3/3.4.2_1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pip-6.0.6-py3.4.egg/pip/_vendor/distlib/scripts.py", line 334, in make_multiple
      filenames.extend(self.make(specification, options))
    File "/usr/local/Cellar/python3/3.4.2_1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pip-6.0.6-py3.4.egg/pip/_vendor/distlib/scripts.py", line 323, in make
      self._make_script(entry, filenames, options=options)
    File "/usr/local/Cellar/python3/3.4.2_1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pip-6.0.6-py3.4.egg/pip/_vendor/distlib/scripts.py", line 227, in _make_script
      self._write_script(scriptnames, shebang, script, filenames, ext)
    File "/usr/local/Cellar/python3/3.4.2_1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pip-6.0.6-py3.4.egg/pip/_vendor/distlib/scripts.py", line 201, in _write_script
      self._fileop.write_binary_file(outname, script_bytes)
    File "/usr/local/Cellar/python3/3.4.2_1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pip-6.0.6-py3.4.egg/pip/_vendor/distlib/util.py", line 388, in write_binary_file
      with open(path, 'wb') as f:
  PermissionError: [Errno 13] Permission denied: '/usr/local/bin/ipcontroller'

Why doesn't this work? How can I get around these errors?

Excellll
  • 12,847

2 Answers2

3

You may not have write permission to the /usr/local/bin directory. To get around this, run

sudo pip3 install ipython

You'll need to enter your password, assuming that you have administrator privileges on your computer.

MattDMo
  • 5,409
0

You use --user, unless you are installing as the super user (su) for some reason.

pip3 install --user ipython

https://pip.pypa.io/en/stable/reference/pip_install/#cmdoption-user

https://github.com/ipython/ipython/blob/master/README.rst