Jupyter notebook noyau mort

alors j'ai essayé de réparer mon carnet Jupyter (il ne me permettait pas d'importer des bibliothèques), cependant, il semble que j'ai empiré les choses. Maintenant, chaque fois que je démarre l'ordinateur portable, le noyau démarre, puis meurt instantanément. L'erreur que j'obtiens est ci-dessous:

[I 15:00:39.002 NotebookApp] Serving notebooks from local directory: /Users/stephanng/Documents/Coding/IPyNB
[I 15:00:39.002 NotebookApp] 0 active kernels 
[I 15:00:39.003 NotebookApp] The Jupyter Notebook is running at: http://localhost:8888/
[I 15:00:39.003 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[W 15:00:43.558 NotebookApp] Notebook 157 Muon Analysis - Copy.ipynb is not trusted
[I 15:00:44.045 NotebookApp] Kernel started: 152a55a1-e393-4e86-b271-859b924e6a3e
/Users/stephanng/anaconda/envs/py27/bin/python: No module named _signatures; 'ipykernel' is a package and cannot be directly executed
[I 15:00:47.047 NotebookApp] KernelRestarter: restarting kernel (1/5)
/Users/stephanng/anaconda/envs/py27/bin/python: No module named _signatures; 'ipykernel' is a package and cannot be directly executed
[I 15:00:50.059 NotebookApp] KernelRestarter: restarting kernel (2/5)
/Users/stephanng/anaconda/envs/py27/bin/python: No module named _signatures; 'ipykernel' is a package and cannot be directly executed
[I 15:00:53.067 NotebookApp] KernelRestarter: restarting kernel (3/5)
/Users/stephanng/anaconda/envs/py27/bin/python: No module named _signatures; 'ipykernel' is a package and cannot be directly executed
[W 15:00:54.257 NotebookApp] Timeout waiting for kernel_info reply from 152a55a1-e393-4e86-b271-859b924e6a3e
[I 15:00:56.078 NotebookApp] KernelRestarter: restarting kernel (4/5)
WARNING:root:kernel 152a55a1-e393-4e86-b271-859b924e6a3e restarted
/Users/stephanng/anaconda/envs/py27/bin/python: No module named _signatures; 'ipykernel' is a package and cannot be directly executed
[W 15:00:59.094 NotebookApp] KernelRestarter: restart failed
[W 15:00:59.095 NotebookApp] Kernel 152a55a1-e393-4e86-b271-859b924e6a3e died, removing from map.
ERROR:root:kernel 152a55a1-e393-4e86-b271-859b924e6a3e restarted failed!
[W 15:00:59.116 NotebookApp] Kernel deleted before session
[W 15:00:59.117 NotebookApp] 410 DELETE /api/sessions/15eb80b6-d134-4142-96fa-1b1012be280c (::1) 5.42ms referer=http://localhost:8888/notebooks/157%20Muon%20Analysis%20-%20Copy.ipynb

y a-t-il un moyen d'arranger ça? Ou devrais-je simplement aller sur une désinstallation complète et réinstallation? Aussi, comment puis-je aller sur le faire? Quand je fais sudo pip uninstall jupyter, il ne semble pas fonctionner.

15
demandé sur Antimony 2016-02-05 02:37:10

1 réponses

ceci est une FAQ.

tl;dr: le Faire au sein de votre ordinateur portable si vous avez besoin de numpy par exemple:

import sys
!conda install --yes --prefix {sys.prefix} numpy

please refer to http://jakevdp.github.io/blog/2017/12/05/installing-python-packages-from-jupyter/ pour une discussion détaillée de la raison pour laquelle" importer foo "dans un environnement Jupyter diffère de" importer foo " dans un environnement de ligne de commande.

1
répondu J_H 2018-01-02 01:42:54