Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/336.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python Jupyter笔记本无法连接到具有路径的内核问题_Python_Jupyter Notebook - Fatal编程技术网

Python Jupyter笔记本无法连接到具有路径的内核问题

Python Jupyter笔记本无法连接到具有路径的内核问题,python,jupyter-notebook,Python,Jupyter Notebook,我已经回顾了这个网站和其他网站上关于如何解决Jupyter笔记本无法连接到内核的问题的一些过去的问题,不幸的是,这些解决方案似乎都不能在我的PC上工作 我最近重新安装了一年前与Jupyter合作的Anaconda,没有任何明显问题。不幸的是,在安装了当前版本之后,似乎无法连接到内核 笔记本电脑的版本是6.4.0 谢谢你的建议!请让我知道是否有任何Jupyter笔记本的旧版本值得尝试 C:\Users\Matt>jupyter notebook [I 17:22:51.893 Noteboo

我已经回顾了这个网站和其他网站上关于如何解决Jupyter笔记本无法连接到内核的问题的一些过去的问题,不幸的是,这些解决方案似乎都不能在我的PC上工作

我最近重新安装了一年前与Jupyter合作的Anaconda,没有任何明显问题。不幸的是,在安装了当前版本之后,似乎无法连接到内核

笔记本电脑的版本是6.4.0

谢谢你的建议!请让我知道是否有任何Jupyter笔记本的旧版本值得尝试

C:\Users\Matt>jupyter notebook
[I 17:22:51.893 NotebookApp] The port 8888 is already in use, trying another por
t.
[I 17:22:51.893 NotebookApp] The port 8889 is already in use, trying another por
t.
[I 17:22:51.893 NotebookApp] The port 8890 is already in use, trying another por
t.
[I 17:22:51.893 NotebookApp] The port 8891 is already in use, trying another por
t.
[I 17:22:51.893 NotebookApp] The port 8892 is already in use, trying another por
t.
[I 2021-05-24 17:22:52.706 LabApp] JupyterLab extension loaded from C:\Users\Matt\anaconda4\lib\site-packages\jupyterlab
[I 2021-05-24 17:22:52.706 LabApp] JupyterLab application directory is C:\Users\
Matt\anaconda4\share\jupyter\lab
[I 17:22:52.706 NotebookApp] Serving notebooks from local directory: C:\Users\Matt
[I 17:22:52.706 NotebookApp] Jupyter Notebook 6.3.0 is running at:
[I 17:22:52.706 NotebookApp] http://localhost:8789/?token=df1853b928378b0ba02a87
c0394909033ff783faac7fd30d
[I 17:22:52.706 NotebookApp]  or http://127.0.0.1:8789/?token=df1853b928378b0ba0
2a87c0394909033ff783faac7fd30d
[I 17:22:52.706 NotebookApp] Use Control-C to stop this server and shut down all
 kernels (twice to skip confirmation).
[C 17:22:52.770 NotebookApp]

    To access the notebook, open this file in a browser:
        file:///C:/Users/Matt/AppData/Roaming/jupyter/runtime/nbserver-468-open
.html
    Or copy and paste one of these URLs:
        http://localhost:8789/?token=df1853b928378b0ba02a87c0394909033ff783faac7
fd30d
     or http://127.0.0.1:8789/?token=df1853b928378b0ba02a87c0394909033ff783faac7
fd30d
Python path configuration:
  PYTHONHOME = (not set)
  PYTHONPATH = (not set)
  program name = 'C:\Users\Matt\anaconda3\python.exe'
  isolated = 0
  environment = 1
  user site = 1
  import site = 1
  sys._base_executable = 'C:\\Users\\Matt\\anaconda3\\python.exe'
  sys.base_prefix = [I 17:23:04.295 NotebookApp] Kernel started: a00eac1b-6c07-4
458-8df7-32cb67dcf7d0, name: python3
''
  sys.base_exec_prefix = ''
  sys.executable = 'C:\\Users\\Matt\\anaconda3\\python.exe'
  sys.prefix = ''
  sys.exec_prefix = ''
  sys.path = [
    'C:\\Users\\Matt\\anaconda3\\python38.zip',
    '.\\DLLs',
    '.\\lib',
    'C:\\Users\\Matt\\anaconda3',
  ]
Fatal Python error: init_fs_encoding: failed to get the Python codec of the file
system encoding
Python runtime state: core initialized
ModuleNotFoundError: No module named 'encodings'

Current thread 0x0000427c (most recent call first):
<no Python frame>
[I 17:23:07.291 NotebookApp] KernelRestarter: restarting kernel (1/5), new rando
m ports
Python path configuration:
  PYTHONHOME = (not set)
  PYTHONPATH = (not set)
  program name = 'C:\Users\Matt\anaconda3\python.exe'
  isolated = 0
  environment = 1
  user site = 1
  import site = 1
  sys._base_executable = 'C:\\Users\\Matt\\anaconda3\\python.exe'
  sys.base_prefix = ''
  sys.base_exec_prefix = ''
  sys.executable = 'C:\\Users\\Matt\\anaconda3\\python.exe'
  sys.prefix = ''
  sys.exec_prefix = ''
  sys.path = [
    'C:\\Users\\Matt\\anaconda3\\python38.zip',
    '.\\DLLs',
    '.\\lib',
    'C:\\Users\\Matt\\anaconda3',
  ]
Fatal Python error: init_fs_encoding: failed to get the Python codec of the file
system encoding
Python runtime state: core initialized
ModuleNotFoundError: No module named 'encodings'

Current thread 0x000043a4 (most recent call first):
<no Python frame>
[I 17:23:10.298 NotebookApp] KernelRestarter: restarting kernel (2/5), new rando
m ports
Python path configuration:
  PYTHONHOME = (not set)
  PYTHONPATH = (not set)
  program name = 'C:\Users\Matt\anaconda3\python.exe'
  isolated = 0
  environment = 1
  user site = 1
  import site = 1
  sys._base_executable = 'C:\\Users\\Matt\\anaconda3\\python.exe'
  sys.base_prefix = ''
  sys.base_exec_prefix = ''
  sys.executable = 'C:\\Users\\Matt\\anaconda3\\python.exe'
  sys.prefix = ''
  sys.exec_prefix = ''
  sys.path = [
    'C:\\Users\\Matt\\anaconda3\\python38.zip',
    '.\\DLLs',
    '.\\lib',
    'C:\\Users\\Matt\\anaconda3',
  ]
Fatal Python error: init_fs_encoding: failed to get the Python codec of the file
system encoding
Python runtime state: core initialized
ModuleNotFoundError: No module named 'encodings'

Current thread 0x00002300 (most recent call first):
<no Python frame>
[I 17:23:13.300 NotebookApp] KernelRestarter: restarting kernel (3/5), new rando
m ports
Python path configuration:
  PYTHONHOME = (not set)
  PYTHONPATH = (not set)
  program name = 'C:\Users\Matt\anaconda3\python.exe'
  isolated = 0
  environment = 1
  user site = 1
  import site = 1
  sys._base_executable = 'C:\\Users\\Matt\\anaconda3\\python.exe'
  sys.base_prefix = ''
  sys.base_exec_prefix = ''
  sys.executable = 'C:\\Users\\Matt\\anaconda3\\python.exe'
  sys.prefix = ''
  sys.exec_prefix = ''
  sys.path = [
    'C:\\Users\\Matt\\anaconda3\\python38.zip',
    '.\\DLLs',
    '.\\lib',
    'C:\\Users\\Matt\\anaconda3',
  ]
Fatal Python error: init_fs_encoding: failed to get the Python codec of the file
system encoding
Python runtime state: core initialized
ModuleNotFoundError: No module named 'encodings'

Current thread 0x00003394 (most recent call first):
<no Python frame>
[I 17:23:16.310 NotebookApp] KernelRestarter: restarting kernel (4/5), new rando
m ports
Python path configuration:
  PYTHONHOME = (not set)
  PYTHONPATH = (not set)
  program name = 'C:\Users\Matt\anaconda3\python.exe'
  isolated = 0
  environment = 1
  user site = 1
  import site = 1
  sys._base_executable = 'C:\\Users\\Matt\\anaconda3\\python.exe'
  sys.base_prefix = ''
  sys.base_exec_prefix = ''
  sys.executable = 'C:\\Users\\Matt\\anaconda3\\python.exe'
  sys.prefix = ''
  sys.exec_prefix = ''
  sys.path = [
    'C:\\Users\\Matt\\anaconda3\\python38.zip',
    '.\\DLLs',
    '.\\lib',
    'C:\\Users\\Matt\\anaconda3',
  ]
Fatal Python error: init_fs_encoding: failed to get the Python codec of the file
system encoding
Python runtime state: core initialized
ModuleNotFoundError: No module named 'encodings'

Current thread 0x0000378c (most recent call first):
<no Python frame>
[W 17:23:19.312 NotebookApp] KernelRestarter: restart failed
[W 17:23:19.312 NotebookApp] Kernel a00eac1b-6c07-4458-8df7-32cb67dcf7d0 died, r
emoving from map.
[W 17:23:25.455 NotebookApp] Replacing stale connection: a00eac1b-6c07-4458-8df7
-32cb67dcf7d0:e711e5b95f2848e88cf2597bf80d45c4
[W 17:23:47.493 NotebookApp] Replacing stale connection: a00eac1b-6c07-4458-8df7
-32cb67dcf7d0:e711e5b95f2848e88cf2597bf80d45c4


 



 
C:\Users\Matt>jupyter笔记本
[I 17:22:51.893 NotebookApp]端口8888已在使用中,正在尝试另一个端口
T
[I 17:22:51.893 NotebookApp]端口8889已在使用中,正在尝试另一个端口
T
[I 17:22:51.893 NotebookApp]端口8890已在使用中,正在尝试另一个端口
T
[I 17:22:51.893 NotebookApp]端口8891已在使用中,正在尝试另一个端口
T
[I 17:22:51.893 NotebookApp]端口8892已在使用中,正在尝试另一个端口
T
[I 2021-05-24 17:22:52.706 LabApp]JupyterLab扩展已从C:\Users\Matt\anaconda4\lib\site packages\JupyterLab加载
[I 2021-05-24 17:22:52.706 LabApp]JupyterLab应用程序目录为C:\Users\
马特\anaconda4\share\jupyter\lab
[I 17:22:52.706 NotebookApp]从本地目录提供笔记本:C:\Users\Matt
[I 17:22:52.706 NotebookApp]Jupyter Notebook 6.3.0运行于:
[I 17:22:52.706 NotebookApp]http://localhost:8789/?token=df1853b928378b0ba02a87
c0394909033ff783faac7fd30d
[I 17:22:52.706 NotebookApp]或http://127.0.0.1:8789/?token=df1853b928378b0ba0
2a87c0394909033ff783faac7fd30d
[I 17:22:52.706 NotebookApp]使用Control-C停止此服务器并关闭所有
内核(两次跳过确认)。
[C 17:22:52.770 NotebookApp]
要访问笔记本,请在浏览器中打开此文件:
file:///C:/Users/Matt/AppData/Roaming/jupyter/runtime/nbserver-468公开赛
.html
或复制并粘贴以下URL之一:
http://localhost:8789/?token=df1853b928378b0ba02a87c0394909033ff783faac7
fd30d
或http://127.0.0.1:8789/?token=df1853b928378b0ba02a87c0394909033ff783faac7
fd30d
Python路径配置:
PYTHONHOME=(未设置)
PYTHONPATH=(未设置)
程序名='C:\Users\Matt\anaconda3\python.exe'
隔离=0
环境=1
用户站点=1
导入站点=1
sys.\u base\u executable='C:\\Users\\Matt\\anaconda3\\python.exe'
sys.base_prefix=[I 17:23:04.295 NotebookApp]内核已启动:a00eac1b-6c07-4
458-8df7-32cb67dcf7d0,名称:蟒蛇3
''
sys.base_exec_前缀=“”
sys.executable='C:\\Users\\Matt\\anaconda3\\python.exe'
sys.prefix=“”
sys.exec_前缀=“”
sys.path=[
'C:\\Users\\Matt\\anaconda3\\python38.zip',
“.\\dll”,
“.\\lib”,
'C:\\Users\\Matt\\anaconda3',
]
致命的Python错误:init_fs_encoding:无法获取文件的Python编解码器
系统编码
Python运行时状态:核心已初始化
ModuleNotFoundError:没有名为“encodings”的模块
当前线程0x0000427c(最新调用优先):
[I 17:23:07.291 NotebookApp]内核重启器:重新启动内核(1/5),新rando
m端口
Python路径配置:
PYTHONHOME=(未设置)
PYTHONPATH=(未设置)
程序名='C:\Users\Matt\anaconda3\python.exe'
隔离=0
环境=1
用户站点=1
导入站点=1
sys.\u base\u executable='C:\\Users\\Matt\\anaconda3\\python.exe'
sys.base_前缀=“”
sys.base_exec_前缀=“”
sys.executable='C:\\Users\\Matt\\anaconda3\\python.exe'
sys.prefix=“”
sys.exec_前缀=“”
sys.path=[
'C:\\Users\\Matt\\anaconda3\\python38.zip',
“.\\dll”,
“.\\lib”,
'C:\\Users\\Matt\\anaconda3',
]
致命的Python错误:init_fs_encoding:无法获取文件的Python编解码器
系统编码
Python运行时状态:核心已初始化
ModuleNotFoundError:没有名为“encodings”的模块
当前线程0x000043a4(最新调用优先):
[I 17:23:10.298 NotebookApp]内核重启器:重新启动内核(2/5),新rando
m端口
Python路径配置:
PYTHONHOME=(未设置)
PYTHONPATH=(未设置)
程序名='C:\Users\Matt\anaconda3\python.exe'
隔离=0
环境=1
用户站点=1
导入站点=1
sys.\u base\u executable='C:\\Users\\Matt\\anaconda3\\python.exe'
sys.base_前缀=“”
sys.base_exec_前缀=“”
sys.executable='C:\\Users\\Matt\\anaconda3\\python.exe'
sys.prefix=“”
sys.exec_前缀=“”
sys.path=[
'C:\\Users\\Matt\\anaconda3\\python38.zip',
“.\\dll”,
“.\\lib”,
'C:\\Users\\Matt\\anaconda3',
]
致命的Python错误:init_fs_encoding:无法获取文件的Python编解码器
系统编码
Python运行时状态:核心已初始化
ModuleNotFoundError:没有名为“encodings”的模块
当前线程0x00002300(最新调用优先):
[I 17:23:13.300 NotebookApp]内核重启器:重新启动内核(3/5),新的rando
m端口
Python路径配置:
PYTHONHOME=(未设置)
PYTHONPATH=(未设置)
程序名='C:\Users\Matt\anaconda3\python.exe'
隔离=0
环境=1
用户站点=1
导入站点=1
sys.\u base\u executable='C:\\Users\\Matt\\anaconda3\\python.exe'
sys.base_前缀=“”
sys.base_exec_前缀=“”
sys.executable='C:\\Users\\Matt\\anaconda3\\python.exe'
sys.prefix=“”
sys.exec_前缀=“”
sys.path=[
'C:\\Users\\Matt\\anaconda3\\python38.zip',
“.\\dll”,
“.\\lib”,
'C:\\Users\\Matt\\anaconda3',
]
致命的Python错误:init_fs_encoding:无法获取文件的Python编解码器
系统编码
Python运行时状态:核心已初始化
ModuleNotFoundError:没有名为“encodings”的模块
当前线程0x00003394(最新调用优先):
[I 17:23:16.310 NotebookApp]内核重启器:重新启动内核(4/5),新的rando
m端口
Python路径配置:
PYTHONHOME=(未设置)
PYTHONPATH=(未设置)
程序名='C:\Users\Matt\anaconda3\python.exe'
隔离=0
环境=1
我们