jupyter 笔记本连接失败新环境

时间:2021-06-22 12:33:11

标签: jupyter-notebook kernel environment

我学习了一门课程,并为 Jupyter Notebook 安装了 anaconda。 一切正常,但现在我为 tensorflow 2.0 创建了一个新环境。 我安装的旧笔记本电脑上的 tensorflow 2.0 环境运行良好,但现在我有一台新笔记本电脑,只有问题。当我打开 Jupiter notebook 并进入我的新环境时,我收到一条消息:

连接失败:与笔记本没有连接,笔记本尝试建立连接。

(Er kan geen verbinding met de notebookserver worden gemaakt。Het notebook blijft proberen opnieuw verbinding te maken。Controleer de configuratie van uw netwerkverbinding of notebookserver。)

我尝试了很多东西,删除环境并创建一个新环境,ipykernel,防病毒...... 有人可以帮帮我吗,我的底座好用吗?

    Active code page: 65001
CONDA_PREFIX=C:\Users\werne\anaconda3
Traceback (most recent call last):
 File "C:\Users\werne\anaconda3\envs\myenv\lib\runpy.py", line 194, in _run_module_as_main
  return _run_code(code, main_globals, None,
 File "C:\Users\werne\anaconda3\envs\myenv\lib\runpy.py", line 87, in _run_code
  exec(code, run_globals)
 File "C:\Users\werne\anaconda3\envs\myenv\lib\site-packages\ipykernel_launcher.py", line 16, in <module>
  app.launch_new_instance()
 File "C:\Users\werne\anaconda3\envs\myenv\lib\site-packages\traitlets\config\application.py", line 844, in launch_instance
  app.initialize(argv)
 File "C:\Users\werne\anaconda3\envs\myenv\lib\site-packages\traitlets\config\application.py", line 87, in inner
  return method(app, *args, **kwargs)
 File "C:\Users\werne\anaconda3\envs\myenv\lib\site-packages\ipykernel\kernelapp.py", line 577, in initialize
  self.write_connection_file()
 File "C:\Users\werne\anaconda3\envs\myenv\lib\site-packages\ipykernel\kernelapp.py", line 230, in write_connection_file
  write_connection_file(cf, ip=self.ip, key=self.session.key, transport=self.transport,
 File "C:\Users\werne\anaconda3\envs\myenv\lib\site-packages\jupyter_client\connect.py", line 136, in write_connection_file
  with secure_write(fname) as f:  File "C:\Users\werne\anaconda3\envs\myenv\lib\contextlib.py", line 113, in __enter__
  return next(self.gen)
 File "C:\Users\werne\anaconda3\envs\myenv\lib\site-packages\jupyter_core\paths.py", line 461, in secure_write
  win32_restrict_file_to_user(fname)
 File "C:\Users\werne\anaconda3\envs\myenv\lib\site-packages\jupyter_core\paths.py", line 387, in win32_restrict_file_to_user
  import win32api
ImportError: DLL load failed while importing win32api: Kan opgegeven procedure niet vinden.
[I 13:51:30.344 NotebookApp] KernelRestarter: restarting kernel (1/5), new random ports
Active code page: 65001
CONDA_PREFIX=C:\Users\werne\anaconda3
[IPKernelApp] ERROR | Failed to load connection file: 'C:\\Users\\werne\\AppData\\Roaming\\jupyter\\runtime\\kernel-b1110dfb-6f93-4075-861e-4d60411a9d99.json'
Traceback (most recent call last):
 File "C:\Users\werne\anaconda3\envs\myenv\lib\site-packages\ipykernel\kernelapp.py", line 257, in init_connection_file
  self.load_connection_file()
 File "C:\Users\werne\anaconda3\envs\myenv\lib\site-packages\jupyter_client\connect.py", line 494, in load_connection_file
 info = json.load(f)
 File "C:\Users\werne\anaconda3\envs\myenv\lib\json\__init__.py", line 293, in load
 return loads(fp.read(),
 File "C:\Users\werne\anaconda3\envs\myenv\lib\json\__init__.py", line 357, in loads
 return _default_decoder.decode(s)
 File "C:\Users\werne\anaconda3\envs\myenv\lib\json\decoder.py", line 337, in decode
 obj, end = self.raw_decode(s, idx=_w(s, 0).end())
 File "C:\Users\werne\anaconda3\envs\myenv\lib\json\decoder.py", line 355, in raw_decode
  raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
[I 13:51:33.353 NotebookApp] KernelRestarter: restarting kernel (2/5), new random ports
Active code page: 65001
CONDA_PREFIX=C:\Users\werne\anaconda3
[IPKernelApp] ERROR | Failed to load connection file: 'C:\\Users\\werne\\AppData\\Roaming\\jupyter\\runtime\\kernel-b1110dfb-6f93-4075-861e-4d60411a9d99.json'
Traceback (most recent call last):
 File "C:\Users\werne\anaconda3\envs\myenv\lib\site-packages\ipykernel\kernelapp.py", line 257, in init_connection_file
  self.load_connection_file()
 File "C:\Users\werne\anaconda3\envs\myenv\lib\site-packages\jupyter_client\connect.py", line 494, in load_connection_file
  info = json.load(f)
 File "C:\Users\werne\anaconda3\envs\myenv\lib\json\__init__.py", line 293, in load
  return loads(fp.read(),
 File "C:\Users\werne\anaconda3\envs\myenv\lib\json\__init__.py", line 357, in loads
  return _default_decoder.decode(s)
 File "C:\Users\werne\anaconda3\envs\myenv\lib\json\decoder.py", line 337, in decode
  obj, end = self.raw_decode(s, idx=_w(s, 0).end())
 File "C:\Users\werne\anaconda3\envs\myenv\lib\json\decoder.py", line 355, in raw_decode
  raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
[I 13:51:36.358 NotebookApp] KernelRestarter: restarting kernel (3/5), new random ports
Active code page: 65001
CONDA_PREFIX=C:\Users\werne\anaconda3
[IPKernelApp] ERROR | Failed to load connection file: 'C:\\Users\\werne\\AppData\\Roaming\\jupyter\\runtime\\kernel-b1110dfb-6f93-4075-861e-4d60411a9d99.json'
Traceback (most recent call last):
 File "C:\Users\werne\anaconda3\envs\myenv\lib\site-packages\ipykernel\kernelapp.py", line 257, in init_connection_file
  self.load_connection_file()
 File "C:\Users\werne\anaconda3\envs\myenv\lib\site-packages\jupyter_client\connect.py", line 494, in load_connection_file
  info = json.load(f)
 File "C:\Users\werne\anaconda3\envs\myenv\lib\json\__init__.py", line 293, in load
  return loads(fp.read(),
 File "C:\Users\werne\anaconda3\envs\myenv\lib\json\__init__.py", line 357, in loads
  return _default_decoder.decode(s)
 File "C:\Users\werne\anaconda3\envs\myenv\lib\json\decoder.py", line 337, in decode
  obj, end = self.raw_decode(s, idx=_w(s, 0).end())
 File "C:\Users\werne\anaconda3\envs\myenv\lib\json\decoder.py", line 355, in raw_decode
  raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
[I 13:51:39.360 NotebookApp] KernelRestarter: restarting kernel (4/5), new random ports
Active code page: 65001
CONDA_PREFIX=C:\Users\werne\anaconda3
[IPKernelApp] ERROR | Failed to load connection file: 'C:\\Users\\werne\\AppData\\Roaming\\jupyter\\runtime\\kernel-b1110dfb-6f93-4075-861e-4d60411a9d99.json'
Traceback (most recent call last):
 File "C:\Users\werne\anaconda3\envs\myenv\lib\site-packages\ipykernel\kernelapp.py", line 257, in init_connection_file self.load_connection_file()
 File "C:\Users\werne\anaconda3\envs\myenv\lib\site-packages\jupyter_client\connect.py", line 494, in load_connection_file
 info = json.load(f)
 File "C:\Users\werne\anaconda3\envs\myenv\lib\json\__init__.py", line 293, in load
 return loads(fp.read(),
 File "C:\Users\werne\anaconda3\envs\myenv\lib\json\__init__.py", line 357, in loads
 return _default_decoder.decode(s)
 File "C:\Users\werne\anaconda3\envs\myenv\lib\json\decoder.py", line 337, in decode
 obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "C:\Users\werne\anaconda3\envs\myenv\lib\json\decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
[W 13:51:42.372 NotebookApp] KernelRestarter: restart failed
[W 13:51:42.372 NotebookApp] Kernel b1110dfb-6f93-4075-861e-4d60411a9d99 died, removing from map.

0 个答案:

没有答案