Невозможно запустить jupyter вне виртуальной среды и создать другую среду
При попытке запустить его, мой Kernell говорит мне, что нет там module named ipykernel_launcher
:
mike@mike-Inspiron-3543:~/Documents/programming/collective$ jupyter notebook
[I 00:04:06.339 NotebookApp] Serving notebooks from local directory: /home/mike/Documents/programming/collective
[I 00:04:06.340 NotebookApp] 0 active kernels
[I 00:04:06.340 NotebookApp] The Jupyter Notebook is running at: http://localhost:8888/?token=a96d6d9457fb856057e1380d01a67c557211e0f85ff4ab2b
[I 00:04:06.340 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 00:04:06.340 NotebookApp]
Copy/paste this URL into your browser when you connect for the first time,
to login with a token:
http://localhost:8888/?token=a96d6d9457fb856057e1380d01a67c557211e0f85ff4ab2b
[I 00:04:07.393 NotebookApp] Accepting one-time-token-authenticated connection from 127.0.0.1
[I 00:04:11.103 NotebookApp] Kernel started: 0c3145b7-4122-4190-ad41-6e09fb6c8006
/home/mike/anaconda3/bin/python: No module named ipykernel_launcher
[I 00:04:14.105 NotebookApp] KernelRestarter: restarting kernel (1/5)
/home/mike/anaconda3/bin/python: No module named ipykernel_launcher
[I 00:04:17.119 NotebookApp] KernelRestarter: restarting kernel (2/5)
/home/mike/anaconda3/bin/python: No module named ipykernel_launcher
^C[I 00:04:20.096 NotebookApp] interrupted
Serving notebooks from local directory: /home/mike/Documents/programming/collective
1 active kernels
The Jupyter Notebook is running at: http://localhost:8888/?token=a96d6d9457fb856057e1380d01a67c557211e0f85ff4ab2b
Shutdown this notebook server (y/[n])? [I 00:04:20.129 NotebookApp] KernelRestarter: restarting kernel (3/5)
/home/mike/anaconda3/bin/python: No module named ipykernel_launcher
[W 00:04:21.250 NotebookApp] Timeout waiting for kernel_info reply from 0c3145b7-4122-4190-ad41-6e09fb6c8006
^C[C 00:04:21.371 NotebookApp] received signal 2, stopping
[I 00:04:21.374 NotebookApp] Shutting down kernels
[I 00:04:21.375 NotebookApp] Kernel shutdown: 0c3145b7-4122-4190-ad41-6e09fb6c8006
На пользовательском интерфейсе это выглядит так:
Итак, увидев эту ссылку, я попытался удалить IPython и переустановить его, но, похоже, есть некоторые конфликты:
mike@mike-Inspiron-3543:~/Documents/programming/collective$ pip uninstall ipykernel
Cannot uninstall 'ipykernel'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
Действительно, я не знаю, связано ли это, но я установил его в виртуальной среде в другой папке:
(mybotenv) mike@mike-Inspiron-3543:~/Documents/programming/mybot$ python -m pip install ipykernel
Collecting ipykernel
...
Installing collected packages: ipykernel
Successfully installed ipykernel-4.9.0
и это сработало отлично. Но сейчас я не могу создать виртуальную среду:
mike@mike-Inspiron-3543:~/Documents/programming/collective$ python3 -m venv envError: Command '['/home/mike/Documents/programming/collective/env/bin/python3', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1.
У меня Ubuntu 16.04 и я использую Python 3