Wie kann ich ipython mit pip3 installieren?

3522
user3491525

Ich habe einfach folgendes gemacht:

brew install python3  pip3 install numpy  pip3 install scipy 

Aber beim Versuch:

pip3 install ipython 

Ich bekomme:

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' 

Warum funktioniert das nicht? Wie kann ich diese Fehler umgehen?

3

2 Antworten auf die Frage

2
MattDMo

Möglicherweise haben Sie keine Schreibberechtigung für das /usr/local/binVerzeichnis. Um dies zu umgehen, renne

sudo pip3 install ipython 

Sie müssen Ihr Kennwort eingeben, sofern Sie über Administratorrechte für Ihren Computer verfügen.

Müssen Sie einen ipython3-Befehl manuell einrichten? cbare vor 8 Jahren 0
@cbare Nein, das wird automatisch von "pip" erledigt MattDMo vor 8 Jahren 0
Sie sollten Sudo niemals mit pip3 verwenden. Wenn Sie Sudo verwenden müssen, stimmt etwas nicht. Andrei Konstantinov vor 6 Jahren 0
0
Honest Abe

Sie verwenden --user, sofern Sie nicht aus irgendeinem Grund als Superuser (su) installiert werden.

pip3 install --user ipython

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

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