我在anaconda中设置了运行gensim的环境。它工作得很好。今天我在环境中更新了gensim和其他一些软件包。现在我在终端窗口中收到以下错误。在我的jupyter笔记本中,内核死了,它无法重新启动,当我尝试导入gensim时,它说找不到模块。我无法弄清楚从哪里开始或出了什么问题。我已经编写了数周的代码,而且在我更新之前,一切都很糟糕。任何线索该做什么?
为什么一些代码永远不会被执行,什么是" image"为什么它找不到它?
以下是失败会话的完整终端输出:
Last login: Fri Mar 9 13:11:37 on ttys000
GWSB-FUN304-M1:~ dlhoffman$ /Users/dlhoffman/.anaconda/navigator/a.tool ; exit;
[I 13:11:41.634 NotebookApp] JupyterLab alpha preview extension loaded from /Users/dlhoffman/anaconda3/lib/python3.6/site-packages/jupyterlab
JupyterLab v0.27.0
Known labextensions:
[I 13:11:41.636 NotebookApp] Running the core application with no additional extensions or settings
[I 13:11:41.640 NotebookApp] Serving notebooks from local directory: /Users/dlhoffman
[I 13:11:41.640 NotebookApp] 0 active kernels
[I 13:11:41.640 NotebookApp] The Jupyter Notebook is running at: http://localhost:8888/?token=cb91dc32623736db4e7cf2baedee4284f4d3adc00cdf9f5c
[I 13:11:41.640 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 13:11:41.644 NotebookApp]
Copy/paste this URL into your browser when you connect for the first time,
to login with a token:
http://localhost:8888/?token=cb91dc32623736db4e7cf2baedee4284f4d3adc00cdf9f5c
[I 13:11:41.758 NotebookApp] Accepting one-time-token-authenticated connection from ::1
[I 13:12:06.185 NotebookApp] Kernel started: 38a44a07-dfc6-4e61-8a69-df62ddc60d46
/Users/dlhoffman/anaconda3/lib/python3.6/site-packages/zmq/backend/cffi/__pycache__/_cffi_ext.c:239:3: warning:
code will never be executed [-Wunreachable-code]
_cffi_check__zmq_msg_t(0);
^~~~~~~~~~~~~~~~~~~~~~
/Users/dlhoffman/anaconda3/lib/python3.6/site-packages/zmq/backend/cffi/__pycache__/_cffi_ext.c:272:3: warning:
code will never be executed [-Wunreachable-code]
_cffi_check__zmq_pollitem_t(0);
^~~~~~~~~~~~~~~~~~~~~~~~~~~
2 warnings generated.
Traceback (most recent call last):
File "/Users/dlhoffman/anaconda3/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/Users/dlhoffman/anaconda3/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/Users/dlhoffman/anaconda3/lib/python3.6/site-packages/ipykernel_launcher.py", line 15, in <module>
from ipykernel import kernelapp as app
File "/Users/dlhoffman/anaconda3/lib/python3.6/site-packages/ipykernel/__init__.py", line 2, in <module>
from .connect import *
File "/Users/dlhoffman/anaconda3/lib/python3.6/site-packages/ipykernel/connect.py", line 18, in <module>
import jupyter_client
File "/Users/dlhoffman/anaconda3/lib/python3.6/site-packages/jupyter_client/__init__.py", line 4, in <module>
from .connect import *
File "/Users/dlhoffman/anaconda3/lib/python3.6/site-packages/jupyter_client/connect.py", line 22, in <module>
import zmq
File "/Users/dlhoffman/anaconda3/lib/python3.6/site-packages/zmq/__init__.py", line 47, in <module>
from zmq import backend
File "/Users/dlhoffman/anaconda3/lib/python3.6/site-packages/zmq/backend/__init__.py", line 40, in <module>
reraise(*exc_info)
File "/Users/dlhoffman/anaconda3/lib/python3.6/site-packages/zmq/utils/sixcerpt.py", line 34, in reraise
raise value
File "/Users/dlhoffman/anaconda3/lib/python3.6/site-packages/zmq/backend/__init__.py", line 27, in <module>
_ns = select_backend(first)
File "/Users/dlhoffman/anaconda3/lib/python3.6/site-packages/zmq/backend/select.py", line 26, in select_backend
mod = __import__(name, fromlist=public_api)
File "/Users/dlhoffman/anaconda3/lib/python3.6/site-packages/zmq/backend/cython/__init__.py", line 6, in <module>
from . import (constants, error, message, context,
ImportError: dlopen(/Users/dlhoffman/anaconda3/lib/python3.6/site-packages/zmq/backend/cython/error.cpython-36m-darwin.so, 2): Library not loaded: @rpath/libsodium.23.dylib
Referenced from: /Users/dlhoffman/anaconda3/lib/libzmq.5.dylib
Reason: image not found
[I 13:12:09.186 NotebookApp] KernelRestarter: restarting kernel (1/5)
Traceback (most recent call last):
File "/Users/dlhoffman/anaconda3/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/Users/dlhoffman/anaconda3/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/Users/dlhoffman/anaconda3/lib/python3.6/site-packages/ipykernel_launcher.py", line 15, in <module>
from ipykernel import kernelapp as app
File "/Users/dlhoffman/anaconda3/lib/python3.6/site-packages/ipykernel/__init__.py", line 2, in <module>
from .connect import *
File "/Users/dlhoffman/anaconda3/lib/python3.6/site-packages/ipykernel/connect.py", line 18, in <module>
import jupyter_client
File "/Users/dlhoffman/anaconda3/lib/python3.6/site-packages/jupyter_client/__init__.py", line 4, in <module>
from .connect import *
File "/Users/dlhoffman/anaconda3/lib/python3.6/site-packages/jupyter_client/connect.py", line 22, in <module>
import zmq
File "/Users/dlhoffman/anaconda3/lib/python3.6/site-packages/zmq/__init__.py", line 47, in <module>
from zmq import backend
File "/Users/dlhoffman/anaconda3/lib/python3.6/site-packages/zmq/backend/__init__.py", line 40, in <module>
reraise(*exc_info)
File "/Users/dlhoffman/anaconda3/lib/python3.6/site-packages/zmq/utils/sixcerpt.py", line 34, in reraise
raise value
File "/Users/dlhoffman/anaconda3/lib/python3.6/site-packages/zmq/backend/__init__.py", line 27, in <module>
_ns = select_backend(first)
File "/Users/dlhoffman/anaconda3/lib/python3.6/site-packages/zmq/backend/select.py", line 26, in select_backend
mod = __import__(name, fromlist=public_api)
File "/Users/dlhoffman/anaconda3/lib/python3.6/site-packages/zmq/backend/cython/__init__.py", line 6, in <module>
from . import (constants, error, message, context,
ImportError: dlopen(/Users/dlhoffman/anaconda3/lib/python3.6/site-packages/zmq/backend/cython/error.cpython-36m-darwin.so, 2): Library not loaded: @rpath/libsodium.23.dylib
Referenced from: /Users/dlhoffman/anaconda3/lib/libzmq.5.dylib
Reason: image not found
[I 13:12:12.194 NotebookApp] KernelRestarter: restarting kernel (2/5)
Traceback (most recent call last):
File "/Users/dlhoffman/anaconda3/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/Users/dlhoffman/anaconda3/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/Users/dlhoffman/anaconda3/lib/python3.6/site-packages/ipykernel_launcher.py", line 15, in <module>
from ipykernel import kernelapp as app
File "/Users/dlhoffman/anaconda3/lib/python3.6/site-packages/ipykernel/__init__.py", line 2, in <module>
from .connect import *
File "/Users/dlhoffman/anaconda3/lib/python3.6/site-packages/ipykernel/connect.py", line 18, in <module>
import jupyter_client
File "/Users/dlhoffman/anaconda3/lib/python3.6/site-packages/jupyter_client/__init__.py", line 4, in <module>
from .connect import *
File "/Users/dlhoffman/anaconda3/lib/python3.6/site-packages/jupyter_client/connect.py", line 22, in <module>
import zmq
File "/Users/dlhoffman/anaconda3/lib/python3.6/site-packages/zmq/__init__.py", line 47, in <module>
from zmq import backend
File "/Users/dlhoffman/anaconda3/lib/python3.6/site-packages/zmq/backend/__init__.py", line 40, in <module>
reraise(*exc_info)
File "/Users/dlhoffman/anaconda3/lib/python3.6/site-packages/zmq/utils/sixcerpt.py", line 34, in reraise
raise value
File "/Users/dlhoffman/anaconda3/lib/python3.6/site-packages/zmq/backend/__init__.py", line 27, in <module>
_ns = select_backend(first)
File "/Users/dlhoffman/anaconda3/lib/python3.6/site-packages/zmq/backend/select.py", line 26, in select_backend
mod = __import__(name, fromlist=public_api)
File "/Users/dlhoffman/anaconda3/lib/python3.6/site-packages/zmq/backend/cython/__init__.py", line 6, in <module>
from . import (constants, error, message, context,
ImportError: dlopen(/Users/dlhoffman/anaconda3/lib/python3.6/site-packages/zmq/backend/cython/error.cpython-36m-darwin.so, 2): Library not loaded: @rpath/libsodium.23.dylib
Referenced from: /Users/dlhoffman/anaconda3/lib/libzmq.5.dylib
Reason: image not found
[I 13:12:15.202 NotebookApp] KernelRestarter: restarting kernel (3/5)
Traceback (most recent call last):
File "/Users/dlhoffman/anaconda3/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/Users/dlhoffman/anaconda3/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/Users/dlhoffman/anaconda3/lib/python3.6/site-packages/ipykernel_launcher.py", line 15, in <module>
from ipykernel import kernelapp as app
File "/Users/dlhoffman/anaconda3/lib/python3.6/site-packages/ipykernel/__init__.py", line 2, in <module>
from .connect import *
File "/Users/dlhoffman/anaconda3/lib/python3.6/site-packages/ipykernel/connect.py", line 18, in <module>
import jupyter_client
File "/Users/dlhoffman/anaconda3/lib/python3.6/site-packages/jupyter_client/__init__.py", line 4, in <module>
from .connect import *
File "/Users/dlhoffman/anaconda3/lib/python3.6/site-packages/jupyter_client/connect.py", line 22, in <module>
import zmq
File "/Users/dlhoffman/anaconda3/lib/python3.6/site-packages/zmq/__init__.py", line 47, in <module>
from zmq import backend
File "/Users/dlhoffman/anaconda3/lib/python3.6/site-packages/zmq/backend/__init__.py", line 40, in <module>
reraise(*exc_info)
File "/Users/dlhoffman/anaconda3/lib/python3.6/site-packages/zmq/utils/sixcerpt.py", line 34, in reraise
raise value
File "/Users/dlhoffman/anaconda3/lib/python3.6/site-packages/zmq/backend/__init__.py", line 27, in <module>
_ns = select_backend(first)
File "/Users/dlhoffman/anaconda3/lib/python3.6/site-packages/zmq/backend/select.py", line 26, in select_backend
mod = __import__(name, fromlist=public_api)
File "/Users/dlhoffman/anaconda3/lib/python3.6/site-packages/zmq/backend/cython/__init__.py", line 6, in <module>
from . import (constants, error, message, context,
ImportError: dlopen(/Users/dlhoffman/anaconda3/lib/python3.6/site-packages/zmq/backend/cython/error.cpython-36m-darwin.so, 2): Library not loaded: @rpath/libsodium.23.dylib
Referenced from: /Users/dlhoffman/anaconda3/lib/libzmq.5.dylib
Reason: image not found
[W 13:12:16.348 NotebookApp] Timeout waiting for kernel_info reply from 38a44a07-dfc6-4e61-8a69-df62ddc60d46
[I 13:12:18.210 NotebookApp] KernelRestarter: restarting kernel (4/5)
kernel 38a44a07-dfc6-4e61-8a69-df62ddc60d46 restarted
Traceback (most recent call last):
File "/Users/dlhoffman/anaconda3/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/Users/dlhoffman/anaconda3/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/Users/dlhoffman/anaconda3/lib/python3.6/site-packages/ipykernel_launcher.py", line 15, in <module>
from ipykernel import kernelapp as app
File "/Users/dlhoffman/anaconda3/lib/python3.6/site-packages/ipykernel/__init__.py", line 2, in <module>
from .connect import *
File "/Users/dlhoffman/anaconda3/lib/python3.6/site-packages/ipykernel/connect.py", line 18, in <module>
import jupyter_client
File "/Users/dlhoffman/anaconda3/lib/python3.6/site-packages/jupyter_client/__init__.py", line 4, in <module>
from .connect import *
File "/Users/dlhoffman/anaconda3/lib/python3.6/site-packages/jupyter_client/connect.py", line 22, in <module>
import zmq
File "/Users/dlhoffman/anaconda3/lib/python3.6/site-packages/zmq/__init__.py", line 47, in <module>
from zmq import backend
File "/Users/dlhoffman/anaconda3/lib/python3.6/site-packages/zmq/backend/__init__.py", line 40, in <module>
reraise(*exc_info)
File "/Users/dlhoffman/anaconda3/lib/python3.6/site-packages/zmq/utils/sixcerpt.py", line 34, in reraise
raise value
File "/Users/dlhoffman/anaconda3/lib/python3.6/site-packages/zmq/backend/__init__.py", line 27, in <module>
_ns = select_backend(first)
File "/Users/dlhoffman/anaconda3/lib/python3.6/site-packages/zmq/backend/select.py", line 26, in select_backend
mod = __import__(name, fromlist=public_api)
File "/Users/dlhoffman/anaconda3/lib/python3.6/site-packages/zmq/backend/cython/__init__.py", line 6, in <module>
from . import (constants, error, message, context,
ImportError: dlopen(/Users/dlhoffman/anaconda3/lib/python3.6/site-packages/zmq/backend/cython/error.cpython-36m-darwin.so, 2): Library not loaded: @rpath/libsodium.23.dylib
Referenced from: /Users/dlhoffman/anaconda3/lib/libzmq.5.dylib
Reason: image not found
[W 13:12:21.219 NotebookApp] KernelRestarter: restart failed
[W 13:12:21.219 NotebookApp] Kernel 38a44a07-dfc6-4e61-8a69-df62ddc60d46 died, removing from map.
kernel 38a44a07-dfc6-4e61-8a69-df62ddc60d46 restarted failed!
[W 13:12:21.232 NotebookApp] Kernel deleted before session
[W 13:12:21.233 NotebookApp] 410 DELETE /api/sessions/b337ffd0-4c75-4d57-bb97-279e3a377e2d (::1) 1.80ms referer=http://localhost:8888/notebooks/Dropbox/_Tom%20and%20Donna/_Jupyter%20Donna/Donna%20pre-process%20the%20IFTTT%20data.ipynb
答案 0 :(得分:1)
无需删除所有内容并重新安装。您可能有一些需要更新的依赖项。
就我而言,我只需要更新zeromq和libsodium
conda update zeromq libsodium
答案 1 :(得分:0)
我向软件工程师展示了终端消息,他说WTF所以我删除了环境并重新安装了所有内容,现在它再次运行。我想这是更复杂的版本“当它怀疑,重新启动。”