2016-01-27 15 views
19

Ich installierte Jupiter mit Pip auf meinem MacBook Air. Beim Versuch, den Befehl jupyter notebook auszuführen, bekomme ich einen FehlerJupyter Notebook Befehl funktioniert nicht auf Mac

jupyter: 'notebook' is not a Jupyter command 

verwendete ich die --h Option eine Auflistung aller jupyter Befehle zu erhalten und in der Tat, ‚Notebook‘ ist nicht einer der Befehle. Ich laufe Python 2.7 und es war bereits installiert, bevor ich Jupyter installierte.

Ich suchte auf Google und ich sehe ein ähnliches Problem einige Leute haben mit der neuesten Version von Jupyter konfrontiert, aber ich sehe keine Lösungen. Kann mir jemand in die richtige Richtung zeigen?

which -a pip:/usr/local/bin/pip

which -a jupyter:/usr/local/bin/jupyter

+0

'Ich installierte jupyter pip auf meinem macbook air.' mit - sprechen Sie uns zeigen, wie Sie installiert 'jupyter'- Hast du' notebook' auch installiert? – cel

+0

Ich rate Notebook wurde zusammen mit Jupiter installiert. Ich überprüfte doppelt, indem ich versuchte, das Notebook via Pip zu installieren (pip install notebook) und bekam die Fehlermeldung, dass das Notebook bereits installiert ist. Für die Installation von jupyter durch Ausführen von 'pip install jupyter' – pokiman

+0

Können Sie Ihre Frage bearbeiten und die Ausgabe von 'which-a pip' und' which-a jupyter' hinzufügen? – cel

Antwort

32

Ich hatte das gleiche Problem. Nach einem Blick auf eine Unmenge von Seiten auf Linie und wie viele Lösungen ausprobiert, das ist das einzige, was für mich gearbeitet:

pip uninstall notebook 
pip install --upgrade notebook 

Ich bin nicht sicher, dass die „Upgrade“ notwendig ist, aber danach hatte ich

jupyter-notebook 

und

jupyter notebook 

als Befehle.

+3

Ich habe nur das Upgrade nicht deinstalliert, und das hat das Problem für mich gelöst. 'pip install --upgrade notebook' – davidheller

+0

Ich erfahre dieses Problem auf Ubuntu 16.10 auch und durch den Upgrade-Prozess auch mein Problem gelöst. Ich denke, das könnte sein, weil ich vor kurzem einige globale Python-Pakete aktualisiert und auch einige Ubuntu-Updates seit der letzten Verwendung meiner Notebooks – AgnosticDev

+0

ausgeführt habe, die für mich nicht funktioniert, immer noch das gleiche Problem –

3

Ich habe den gleichen Fehler wie Sie, wenn which jupyter/usr/local/bin/jupyter ist. ich es geschafft, den Fall zu lösen, indem sie einem Update/Upgrade alle meine ipython Pakete

sudo -H pip install --upgrade "ipython[all]" 

I 16.04 der Fall in OS X El-Capitan 10.11.5 und Ubuntu Linux lösen verwaltet. Meine Jupyter-Version nach dem Upgrade ist 4.1.0. Mein Python ist 2.7.11+. Meine Pip Version ist 8.1.2.

0

Versuchen Sie, den Ordner, in dem, um herauszufinden, die Binärdateien aus dem Home-Ordner mit diesem Befehl installiert wurden:

find . -name "jupyter" 

Wenn Sie binäre finden, führen Sie es aus diesem Pfad direkt oder setzen diesen Weg zu $PATH.

0

verwenden: sudo pip install notebook im Terminal.

+0

sudo pip führt Sicherheitsrisiken ein, gegen die zumindest gewarnt werden sollte - https://askubuntu.com/questions/802544/is-sudo-pip-install-still-a-broken-practice. Normalerweise gibt es einen besseren Weg als mit Sudo 'zu bomben' – SRDC

1

Ich bekam Fehler bei der Installation von Jupiter auf MacOS Sierra. Kämpfte, um jupyter zu installieren und fand später die Ursache, also hier zu teilen.

Die Ausnahmen waren wie unten -

Exception: 
Traceback (most recent call last): 
    File "/Library/Python/2.7/site-packages/pip/basecommand.py", line 215, in main 
    status = self.run(options, args) 
    File "/Library/Python/2.7/site-packages/pip/commands/install.py", line 342, in run 
    prefix=options.prefix_path, 
    File "/Library/Python/2.7/site-packages/pip/req/req_set.py", line 778, in install 
    requirement.uninstall(auto_confirm=True) 
    File "/Library/Python/2.7/site-packages/pip/req/req_install.py", line 754, in uninstall 
    paths_to_remove.remove(auto_confirm) 
    File "/Library/Python/2.7/site-packages/pip/req/req_uninstall.py", line 115, in remove 
    renames(path, new_path) 
    File "/Library/Python/2.7/site-packages/pip/utils/__init__.py", line 267, in renames 
    shutil.move(old, new) 
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 299, in move 
    copytree(src, real_dst, symlinks=True) 
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 208, in copytree 
    raise Error, errors 
Error: [('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/__init__.py', '/tmp/pip-tchevt-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/__init__.py', "[Errno 1] Operation not permitted: '/tmp/pip-tchevt-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/__init__.py'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/__init__.pyc', '/tmp/pip-tchevt-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/__init__.pyc', "[Errno 1] Operation not permitted: '/tmp/pip-tchevt-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/__init__.pyc'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/easter.py', '/tmp/pip-tchevt-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/easter.py', "[Errno 1] Operation not permitted: '/tmp/pip-tchevt-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/easter.py'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/easter.pyc', '/tmp/pip-tchevt-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/easter.pyc', "[Errno 1] Operation not permitted: '/tmp/pip-tchevt-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/easter.pyc'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/parser.py', '/tmp/pip-tchevt-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/parser.py', "[Errno 1] Operation not permitted: '/tmp/pip-tchevt-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/parser.py'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/parser.pyc', '/tmp/pip-tchevt-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/parser.pyc', "[Errno 1] Operation not permitted: '/tmp/pip-tchevt-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/parser.pyc'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/relativedelta.py', '/tmp/pip-tchevt-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/relativedelta.py', "[Errno 1] Operation not permitted: '/tmp/pip-tchevt-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/relativedelta.py'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/relativedelta.pyc', '/tmp/pip-tchevt-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/relativedelta.pyc', "[Errno 1] Operation not permitted: '/tmp/pip-tchevt-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/relativedelta.pyc'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/rrule.py', '/tmp/pip-tchevt-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/rrule.py', "[Errno 1] Operation not permitted: '/tmp/pip-tchevt-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/rrule.py'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/rrule.pyc', '/tmp/pip-tchevt-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/rrule.pyc', "[Errno 1] Operation not permitted: '/tmp/pip-tchevt-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/rrule.pyc'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/tz.py', '/tmp/pip-tchevt-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/tz.py', "[Errno 1] Operation not permitted: '/tmp/pip-tchevt-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/tz.py'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/tz.pyc', '/tmp/pip-tchevt-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/tz.pyc', "[Errno 1] Operation not permitted: '/tmp/pip-tchevt-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/tz.pyc'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/tzwin.py', '/tmp/pip-tchevt-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/tzwin.py', "[Errno 1] Operation not permitted: '/tmp/pip-tchevt-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/tzwin.py'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/tzwin.pyc', '/tmp/pip-tchevt-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/tzwin.pyc', "[Errno 1] Operation not permitted: '/tmp/pip-tchevt-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/tzwin.pyc'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/zoneinfo/__init__.py', '/tmp/pip-tchevt-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/zoneinfo/__init__.py', "[Errno 1] Operation not permitted: '/tmp/pip-tchevt-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/zoneinfo/__init__.py'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/zoneinfo/__init__.pyc', '/tmp/pip-tchevt-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/zoneinfo/__init__.pyc', "[Errno 1] Operation not permitted: '/tmp/pip-tchevt-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/zoneinfo/__init__.pyc'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/zoneinfo/zoneinfo-2010g.tar.gz', '/tmp/pip-tchevt-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/zoneinfo/zoneinfo-2010g.tar.gz', "[Errno 1] Operation not permitted: '/tmp/pip-tchevt-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/zoneinfo/zoneinfo-2010g.tar.gz'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/zoneinfo', '/tmp/pip-tchevt-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/zoneinfo', "[Errno 1] Operation not permitted: '/tmp/pip-tchevt-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/zoneinfo'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil', '/tmp/pip-tchevt-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil', "[Errno 1] Operation not permitted: '/tmp/pip-tchevt-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil'")] 

fand ich dieses Problem in MacOS Sierra und El-Capitan und diese festgesetzten sechs ignoriert.

pip install --upgrade notebook --ignore-installed six 

Ref - https://github.com/pypa/pip/issues/3165

0

finde ich eine Lösung, die dieses Problem auf meinem Mac gelöst

sudo rm -rf /Library/Frameworks/Python.framework 
rm /usr/local/bin/python3* 
brew uninstall python3 
brew install python3 
which python3 
sudo python3 -m pip install --upgrade pip 
sudo python3 -m pip install jupyter 
which jupyter 
jupyter notebook 
Verwandte Themen