创建新的iPython笔记本时内核死亡。

创建新的iPython笔记本时内核死亡。,python,kernel,ipython,anaconda,jupyter,Python,Kernel,Ipython,Anaconda,Jupyter,我对编码相当陌生,非常感谢您对我的帮助。它在一周前工作了,现在我无法连接我的笔记本内核。我使用anaconda命令提示符打开notebooke(ipython笔记本),打开jupyter ipython页面。我按下新的蟒蛇笔记本。30秒后,内核死亡(我认为它一开始不会连接)。 下面是anaconda命令提示符中出现的错误。我希望我能理解它在说什么。我把它交给stack overflow社区的知识渊博的人。谢谢你的帮助~标记 全局历史管理器= 全局外壳=未定义 自我= 全局父项=未定义 1637

我对编码相当陌生,非常感谢您对我的帮助。它在一周前工作了,现在我无法连接我的笔记本内核。我使用anaconda命令提示符打开notebooke(ipython笔记本),打开jupyter ipython页面。我按下新的蟒蛇笔记本。30秒后,内核死亡(我认为它一开始不会连接)。 下面是anaconda命令提示符中出现的错误。我希望我能理解它在说什么。我把它交给stack overflow社区的知识渊博的人。谢谢你的帮助~标记

全局历史管理器=
全局外壳=未定义
自我=
全局父项=未定义
1637 self.configurables.append(self.history\u管理器)
1638
C:\Users\Admin\Anaconda2\lib\site packages\IPython\core\history.pyc在uuuu init_uuu中(self=,shell=,config=None,**traits={'parent':})
518 self.save_thread.start()
519
-->520.自我介绍。新课程()
self.new_会话=
521
522定义获取历史文件名(self,profile=None):
新会话中的C:\Users\Admin\Anaconda2\lib\site packages\IPython\core\history.pyc(self=,conn=None)
C:\Users\Admin\Anaconda2\lib\site packages\IPython\core\history.pyc in needs_sqlite(f=,self=,*a=(None,),**kw={})
66返回[]
67其他:
--->68回路f(自身,*a,**kw)
f=
自我=
a=(无)
kw={}
69
70
C:\Users\Admin\Anaconda2\lib\site packages\IPython\core\history.pyc在新会话中(self=,conn=)
536与康涅狄格州:
537 cur=conn.execute(“”)插入会话值(NULL、、NULL、,
-->538 NULL,““”“”,(datetime.datetime.now(),)
全局NULL=未定义
全局关闭=未定义
全局值=未定义
全局数据库=未定义
全局会话=未定义
全局填充=未定义
全局结束=未定义
全局时间=未定义
全局行=未定义
全局计数.UPDATE=未定义
全局会话=未定义
全局集=未定义
全局num_cmds=未定义
全局,其中=未定义
539 self.session_number=cur.lastrowid
540
操作错误:尝试写入只读数据库
[W 18:20:53.372 NotebookApp]等待来自05f482d7-7690-4783-a20f-46c25a5944ce的内核信息回复超时
[I 18:20:55.388 NotebookApp]内核重启器:重新启动内核(4/5)
警告:根目录:内核05f482d7-7690-4783-a20f-46c25a5944ce已重新启动
---------------------------------------------------------------------------
操作错误回溯(最近一次呼叫最后一次)
C:\Users\Admin\Anaconda2\lib\runpy.pyc在作为主模块运行的模块中(mod\u name='ipykernel.\uuuuuuuu main\uuuu',alter\u argv=1)
160 sys.argv[0]=fname
161返回运行代码(代码、主全局、无、,
-->162“\uuuu main\uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu
fname='C:\\Users\\Admin\\Anaconda2\\lib\\site packages\\ipykernel\\\\uuuu main\uuuuuu.py'
加载器=
pkg_name='ipykernel'
163
164 def run_模块(模块名称,初始全局=无,
C:\Users\Admin\Anaconda2\lib\runpy.pyc在运行代码中(代码=591应用程序初始化(argv)
app.initialize=
argv=无
592应用程序启动()
593
初始化中的C:\Users\Admin\Anaconda2\lib\site packages\ipykernel\kernelapp.pyc(self=,argv=None)
C:\Users\Admin\Anaconda2\lib\site packages\traitlets\config\application.pyc在catch\u config\u错误中(方法=,应用=,*args=(无,),**kwargs={})
73     """
74尝试:
--->75返回方法(应用程序,*args,**kwargs)
方法=
应用=
args=(无,)
kwargs={}
76除(TraitError、ArgumentError)外,如e:
77应用程序打印帮助()
初始化中的C:\Users\Admin\Anaconda2\lib\site packages\ipykernel\kernelapp.pyc(self=,argv=None)
380 self.init_io()
381 self.init_信号
 global HistoryManager = <class 'IPython.core.history.HistoryManager'>
        global shell = undefined
        self = <ipykernel.zmqshell.ZMQInteractiveShell object at 0x0000000003D0AEB8>
        global parent = undefined
   1637         self.configurables.append(self.history_manager)
   1638

C:\Users\Admin\Anaconda2\lib\site-packages\IPython\core\history.pyc in __init__(self=<IPython.core.history.HistoryManager object>, shell=<ipykernel.zmqshell.ZMQInteractiveShell object>, config=None, **traits={'parent': <ipykernel.zmqshell.ZMQInteractiveShell object>})
    518             self.save_thread.start()
    519
--> 520         self.new_session()
        self.new_session = <bound method HistoryManager.new_session of <IPython.core.history.HistoryManager object at 0x0000000003D20898>>
    521
    522     def _get_hist_file_name(self, profile=None):

C:\Users\Admin\Anaconda2\lib\site-packages\IPython\core\history.pyc in new_session(self=<IPython.core.history.HistoryManager object>, conn=None)

C:\Users\Admin\Anaconda2\lib\site-packages\IPython\core\history.pyc in needs_sqlite(f=<function new_session>, self=<IPython.core.history.HistoryManager object>, *a=(None,), **kw={})
     66         return []
     67     else:
---> 68         return f(self, *a, **kw)
        f = <function new_session at 0x0000000003796048>
        self = <IPython.core.history.HistoryManager object at 0x0000000003D20898>
        a = (None,)
        kw = {}
     69
     70

C:\Users\Admin\Anaconda2\lib\site-packages\IPython\core\history.pyc in new_session(self=<IPython.core.history.HistoryManager object>, conn=<sqlite3.Connection object>)
    536         with conn:
    537             cur = conn.execute("""INSERT INTO sessions VALUES (NULL, ?, NULL,
--> 538                             NULL, "") """, (datetime.datetime.now(),))
        global NULL = undefined
        global Close = undefined
        global the = undefined
        global database = undefined
        global session = undefined
        global filling = undefined
        global end = undefined
        global time = undefined
        global line = undefined
        global count.UPDATE = undefined
        global sessions = undefined
        global SET = undefined
        global num_cmds = undefined
        global WHERE = undefined
    539             self.session_number = cur.lastrowid
    540

OperationalError: attempt to write a readonly database
[W 18:20:53.372 NotebookApp] Timeout waiting for kernel_info reply from 05f482d7-7690-4783-a20f-46c25a5944ce
[I 18:20:55.388 NotebookApp] KernelRestarter: restarting kernel (4/5)
WARNING:root:kernel 05f482d7-7690-4783-a20f-46c25a5944ce restarted
---------------------------------------------------------------------------
OperationalError                          Traceback (most recent call last)
C:\Users\Admin\Anaconda2\lib\runpy.pyc in _run_module_as_main(mod_name='ipykernel.__main__', alter_argv=1)
    160         sys.argv[0] = fname
    161     return _run_code(code, main_globals, None,
--> 162                      "__main__", fname, loader, pkg_name)
        fname = 'C:\\Users\\Admin\\Anaconda2\\lib\\site-packages\\ipykernel\\__main__.py'
        loader = <pkgutil.ImpLoader instance at 0x0000000003BCFD08>
        pkg_name = 'ipykernel'
    163
    164 def run_module(mod_name, init_globals=None,

C:\Users\Admin\Anaconda2\lib\runpy.pyc in _run_code(code=<code object <module> at 00000000026ADDB0, file ...lib\site-packages\ipykernel\__main__.py", line 1>, run_globals={'__builtins__': <module '__builtin__' (built-in)>, '__doc__': None, '__file__': r'C:\Users\Admin\Anaconda2\lib\site-packages\ipykernel\__main__.py', '__loader__': <pkgutil.ImpLoader instance>, '__name__': '__main__', '__package__': 'ipykernel', 'app': <module 'ipykernel.kernelapp' from 'C:\Users\Adm...onda2\lib\site-packages\ipykernel\kernelapp.pyc'>}, init_globals=None, mod_name='__main__', mod_fname=r'C:\Users\Admin\Anaconda2\lib\site-packages\ipykernel\__main__.py', mod_loader=<pkgutil.ImpLoader instance>, pkg_name='ipykernel')
     70                        __loader__ = mod_loader,
     71                        __package__ = pkg_name)
---> 72     exec code in run_globals
        code = <code object <module> at 00000000026ADDB0, file "C:\Users\Admin\Anaconda2\lib\site-packages\ipykernel\__main__.py", line 1>
        run_globals = {'__builtins__': <module '__builtin__' (built-in)>, '__file__': 'C:\\Users\\Admin\\Anaconda2\\lib\\site-packages\\ipykernel\\__main__.py', '__package__': 'ipykernel', '__name__': '__main__', 'app': <module 'ipykernel.kernelapp' from 'C:\Users\Admin\Anaconda2\lib\site-packages\ipykernel\kernelapp.pyc'>, '__loader__': <pkgutil.ImpLoader instance at 0x0000000003BCFD08>, '__doc__': None}
     73     return run_globals
     74

C:\Users\Admin\Anaconda2\lib\site-packages\ipykernel\__main__.py in <module>()
      1 if __name__ == '__main__':
      2     from ipykernel import kernelapp as app
----> 3     app.launch_new_instance()
        global app.launch_new_instance = <bound method MetaHasTraits.launch_instance of <class 'ipykernel.kernelapp.IPKernelApp'>>

C:\Users\Admin\Anaconda2\lib\site-packages\traitlets\config\application.pyc in launch_instance(cls=<class 'ipykernel.kernelapp.IPKernelApp'>, argv=None, **kwargs={})
    589         """
    590         app = cls.instance(**kwargs)
--> 591         app.initialize(argv)
        app.initialize = <bound method IPKernelApp.initialize of <ipykernel.kernelapp.IPKernelApp object at 0x0000000003C8DD30>>
        argv = None
    592         app.start()
    593

C:\Users\Admin\Anaconda2\lib\site-packages\ipykernel\kernelapp.pyc in initialize(self=<ipykernel.kernelapp.IPKernelApp object>, argv=None)

C:\Users\Admin\Anaconda2\lib\site-packages\traitlets\config\application.pyc in catch_config_error(method=<function initialize>, app=<ipykernel.kernelapp.IPKernelApp object>, *args=(None,), **kwargs={})
     73     """
     74     try:
---> 75         return method(app, *args, **kwargs)
        method = <function initialize at 0x0000000003C91908>
        app = <ipykernel.kernelapp.IPKernelApp object at 0x0000000003C8DD30>
        args = (None,)
        kwargs = {}
     76     except (TraitError, ArgumentError) as e:
     77         app.print_help()

C:\Users\Admin\Anaconda2\lib\site-packages\ipykernel\kernelapp.pyc in initialize(self=<ipykernel.kernelapp.IPKernelApp object>, argv=None)
    380         self.init_io()
    381         self.init_signal()
--> 382         self.init_kernel()
        self.init_kernel = <bound method IPKernelApp.init_kernel of <ipykernel.kernelapp.IPKernelApp object at 0x0000000003C8DD30>>
    383         # shell init steps
    384         self.init_path()

C:\Users\Admin\Anaconda2\lib\site-packages\ipykernel\kernelapp.pyc in init_kernel(self=<ipykernel.kernelapp.IPKernelApp object>)
    319                                 log=self.log,
    320                                 profile_dir=self.profile_dir,
--> 321                                 user_ns=self.user_ns,
        global user_ns = undefined
        self.user_ns = None
    322         )
    323         kernel.record_ports(self.ports)

C:\Users\Admin\Anaconda2\lib\site-packages\traitlets\config\configurable.pyc in instance(cls=<class 'ipykernel.ipkernel.IPythonKernel'>, *args=(), **kwargs={'iopub_socket': <zmq.sugar.socket.Socket object>, 'log': <logging.Logger object>, 'parent': <ipykernel.kernelapp.IPKernelApp object>, 'profile_dir': <IPython.core.profiledir.ProfileDir object>, 'session': <jupyter_client.session.Session object>, 'shell_streams': [<zmq.eventloop.zmqstream.ZMQStream object>, <zmq.eventloop.zmqstream.ZMQStream object>], 'stdin_socket': <zmq.sugar.socket.Socket object>, 'user_ns': None})
    378         # Create and save the instance
    379         if cls._instance is None:
--> 380             inst = cls(*args, **kwargs)
        inst = undefined
        cls = <class 'ipykernel.ipkernel.IPythonKernel'>
        args = ()
        kwargs = {'log': <logging.Logger object at 0x0000000003CA3278>, 'parent': <ipykernel.kernelapp.IPKernelApp object at 0x0000000003C8DD30>, 'shell_streams': [<zmq.eventloop.zmqstream.ZMQStream object at 0x0000000003CE9AC8>, <zmq.eventloop.zmqstream.ZMQStream object at 0x0000000003CE9C50>], 'user_ns': None, 'iopub_socket': <zmq.sugar.socket.Socket object at 0x0000000003CA2348>, 'profile_dir': <IPython.core.profiledir.ProfileDir object at 0x0000000003CAEA20>, 'session': <jupyter_client.session.Session object at 0x0000000003CAEB00>, 'stdin_socket': <zmq.sugar.socket.Socket object at 0x0000000003CA23A8>}
    381             # Now make sure that the instance will also be returned by
    382             # parent classes' _instance attribute.

C:\Users\Admin\Anaconda2\lib\site-packages\ipykernel\ipkernel.pyc in __init__(self=<ipykernel.ipkernel.IPythonKernel object>, **kwargs={'iopub_socket': <zmq.sugar.socket.Socket object>, 'log': <logging.Logger object>, 'parent': <ipykernel.kernelapp.IPKernelApp object>, 'profile_dir': <IPython.core.profiledir.ProfileDir object>, 'session': <jupyter_client.session.Session object>, 'shell_streams': [<zmq.eventloop.zmqstream.ZMQStream object>, <zmq.eventloop.zmqstream.ZMQStream object>], 'stdin_socket': <zmq.sugar.socket.Socket object>, 'user_ns': None})
     45             user_module = self.user_module,
     46             user_ns     = self.user_ns,
---> 47             kernel      = self,
        global kernel = undefined
        self = <ipykernel.ipkernel.IPythonKernel object at 0x0000000003CE9D68>
     48         )
     49         self.shell.displayhook.session = self.session

C:\Users\Admin\Anaconda2\lib\site-packages\traitlets\config\configurable.pyc in instance(cls=<class 'ipykernel.zmqshell.ZMQInteractiveShell'>, *args=(), **kwargs={'kernel': <ipykernel.ipkernel.IPythonKernel object>, 'parent': <ipykernel.ipkernel.IPythonKernel object>, 'profile_dir': <IPython.core.profiledir.ProfileDir object>, 'user_module': None, 'user_ns': None})
    378         # Create and save the instance
    379         if cls._instance is None:
--> 380             inst = cls(*args, **kwargs)
        inst = undefined
        cls = <class 'ipykernel.zmqshell.ZMQInteractiveShell'>
        args = ()
        kwargs = {'kernel': <ipykernel.ipkernel.IPythonKernel object at 0x0000000003CE9D68>, 'user_ns': None, 'profile_dir': <IPython.core.profiledir.ProfileDir object at 0x0000000003CAEA20>, 'parent': <ipykernel.ipkernel.IPythonKernel object at 0x0000000003CE9D68>, 'user_module': None}
    381             # Now make sure that the instance will also be returned by
    382             # parent classes' _instance attribute.

C:\Users\Admin\Anaconda2\lib\site-packages\IPython\core\interactiveshell.pyc in __init__(self=<ipykernel.zmqshell.ZMQInteractiveShell object>, ipython_dir=None, profile_dir=<IPython.core.profiledir.ProfileDir object>, user_module=None, user_ns=None, custom_exceptions=((), None), **kwargs={'kernel': <ipykernel.ipkernel.IPythonKernel object>, 'parent': <ipykernel.ipkernel.IPythonKernel object>})
    511         self.db = PickleShareDB(os.path.join(self.profile_dir.location, 'db'))
    512
--> 513         self.init_history()
        self.init_history = <bound method ZMQInteractiveShell.init_history of <ipykernel.zmqshell.ZMQInteractiveShell object at 0x0000000003C8DEB8>>
    514         self.init_encoding()
    515         self.init_prefilter()

C:\Users\Admin\Anaconda2\lib\site-packages\IPython\core\interactiveshell.pyc in init_history(self=<ipykernel.zmqshell.ZMQInteractiveShell object>)
   1634     def init_history(self):
   1635         """Sets up the command history, and starts regular autosaves."""
-> 1636         self.history_manager = HistoryManager(shell=self, parent=self)
        self.history_manager = None
        global HistoryManager = <class 'IPython.core.history.HistoryManager'>
        global shell = undefined
        self = <ipykernel.zmqshell.ZMQInteractiveShell object at 0x0000000003C8DEB8>
        global parent = undefined
   1637         self.configurables.append(self.history_manager)
   1638

C:\Users\Admin\Anaconda2\lib\site-packages\IPython\core\history.pyc in __init__(self=<IPython.core.history.HistoryManager object>, shell=<ipykernel.zmqshell.ZMQInteractiveShell object>, config=None, **traits={'parent': <ipykernel.zmqshell.ZMQInteractiveShell object>})
    518             self.save_thread.start()
    519
--> 520         self.new_session()
        self.new_session = <bound method HistoryManager.new_session of <IPython.core.history.HistoryManager object at 0x0000000003CA3898>>
    521
    522     def _get_hist_file_name(self, profile=None):

C:\Users\Admin\Anaconda2\lib\site-packages\IPython\core\history.pyc in new_session(self=<IPython.core.history.HistoryManager object>, conn=None)

C:\Users\Admin\Anaconda2\lib\site-packages\IPython\core\history.pyc in needs_sqlite(f=<function new_session>, self=<IPython.core.history.HistoryManager object>, *a=(None,), **kw={})
     66         return []
     67     else:
---> 68         return f(self, *a, **kw)
        f = <function new_session at 0x0000000003716048>
        self = <IPython.core.history.HistoryManager object at 0x0000000003CA3898>
        a = (None,)
        kw = {}
     69
     70

C:\Users\Admin\Anaconda2\lib\site-packages\IPython\core\history.pyc in new_session(self=<IPython.core.history.HistoryManager object>, conn=<sqlite3.Connection object>)
    536         with conn:
    537             cur = conn.execute("""INSERT INTO sessions VALUES (NULL, ?, NULL,
--> 538                             NULL, "") """, (datetime.datetime.now(),))
        global NULL = undefined
        global Close = undefined
        global the = undefined
        global database = undefined
        global session = undefined
        global filling = undefined
        global end = undefined
        global time = undefined
        global line = undefined
        global count.UPDATE = undefined
        global sessions = undefined
        global SET = undefined
        global num_cmds = undefined
        global WHERE = undefined
    539             self.session_number = cur.lastrowid
    540

OperationalError: attempt to write a readonly database