zmq.error.ZMQError:地址已被使用

zmq.error.ZMQError:地址已被使用

我在 ubuntu 20.04 系统中安装了 Anaconda (python 3.7)。但是,从 Spyder 控制台运行 Python 代码时,出现以下错误:

An error occurred while starting the kernel

我搜索了网络,但没有一个现有的解决方案可以解决我的问题。这是尝试执行代码时控制台中收到的详细错误:

Traceback (most recent call last):
File "/home/exx/anaconda3/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/home/exx/anaconda3/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/exx/anaconda3/lib/python3.7/site‑packages/spyder_kernels/console/__main__.py", line 23, in 
start.main()
File "/home/exx/anaconda3/lib/python3.7/site‑packages/spyder_kernels/console/start.py", line 284, in main
kernel.initialize()
File "/home/exx/anaconda3/lib/python3.7/site‑packages/traitlets/config/application.py", line 87, in inner
return method(app, *args, **kwargs)
File "/home/exx/anaconda3/lib/python3.7/site‑packages/ipykernel/kernelapp.py", line 567, in initialize
self.init_sockets()
File "/home/exx/anaconda3/lib/python3.7/site‑packages/ipykernel/kernelapp.py", line 271, in init_sockets
self.shell_port = self._bind_socket(self.shell_socket, self.shell_port)
File "/home/exx/anaconda3/lib/python3.7/site‑packages/ipykernel/kernelapp.py", line 218, in _bind_socket
return self._try_bind_socket(s, port)
File "/home/exx/anaconda3/lib/python3.7/site‑packages/ipykernel/kernelapp.py", line 194, in _try_bind_socket
s.bind("tcp://%s:%i" % (self.ip, port))
File "/home/exx/anaconda3/lib/python3.7/site‑packages/zmq/sugar/socket.py", line 173, in bind
super().bind(addr)
File "zmq/backend/cython/socket.pyx", line 542, in zmq.backend.cython.socket.Socket.bind
File "zmq/backend/cython/checkrc.pxd", line 28, in zmq.backend.cython.checkrc._check_rc
zmq.error.ZMQError: Address already in use

相关内容