attributeerror:“token”对象在运行jupyter笔记本时没有属性“test”

mwyxok5s  于 2021-08-20  发布在  Java
关注(0)|答案(0)|浏览(208)

首先我用pip安装了jupyter笔记本,然后我想用命令提示符运行它,所以我输入, jupyter notebook . 但是有一个错误,

[I 09:31:06.028 NotebookApp] JupyterLab extension loaded from c:\users\user\appdata\local\programs\python\python36-32\lib\site-packages\jupyterlab
[I 09:31:06.028 NotebookApp] JupyterLab application directory is c:\users\user\appdata\local\programs\python\python36-32\share\jupyter\lab
[I 09:31:06.028 NotebookApp] Serving notebooks from local directory: C:\Users\user
[I 09:31:06.028 NotebookApp] Jupyter Notebook 6.4.0 is running at:
[I 09:31:06.028 NotebookApp] http://localhost:8888/?token=f5cd310ad59649b628788371d5598df3baabe6d5d28cd603
[I 09:31:06.028 NotebookApp]  or http://127.0.0.1:8888/?token=f5cd310ad59649b628788371d5598df3baabe6d5d28cd603
[I 09:31:06.028 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
Traceback (most recent call last):
  File "c:\users\user\appdata\local\programs\python\python36-32\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\users\user\appdata\local\programs\python\python36-32\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\user\AppData\Local\Programs\Python\Python36-32\Scripts\jupyter-notebook.EXE\__main__.py", line 7, in <module>
  File "c:\users\user\appdata\local\programs\python\python36-32\lib\site-packages\jupyter_core\application.py", line 254, in launch_instance
    return super(JupyterApp, cls).launch_instance(argv=argv,**kwargs)
  File "c:\users\user\appdata\local\programs\python\python36-32\lib\site-packages\traitlets\config\application.py", line 664, in launch_instance
    app.start()
  File "c:\users\user\appdata\local\programs\python\python36-32\lib\site-packages\notebook\notebookapp.py", line 2311, in start
    self.write_browser_open_file()
  File "c:\users\user\appdata\local\programs\python\python36-32\lib\site-packages\notebook\notebookapp.py", line 2215, in write_browser_open_file
    self._write_browser_open_file(open_url, f)
  File "c:\users\user\appdata\local\programs\python\python36-32\lib\site-packages\notebook\notebookapp.py", line 2223, in _write_browser_open_file
    template = jinja2_env.get_template('browser-open.html')
  File "c:\users\user\appdata\local\programs\python\python36-32\lib\site-packages\jinja2\environment.py", line 997, in get_template
    return self._load_template(name, globals)
  File "c:\users\user\appdata\local\programs\python\python36-32\lib\site-packages\jinja2\environment.py", line 958, in _load_template
    template = self.loader.load(self, name, self.make_globals(globals))
  File "c:\users\user\appdata\local\programs\python\python36-32\lib\site-packages\jinja2\loaders.py", line 137, in load
    code = environment.compile(source, name, filename)
  File "c:\users\user\appdata\local\programs\python\python36-32\lib\site-packages\jinja2\environment.py", line 749, in compile
    source = self._parse(source, name, filename)
  File "c:\users\user\appdata\local\programs\python\python36-32\lib\site-packages\jinja2\environment.py", line 606, in _parse
    return Parser(self, source, name, filename).parse()
  File "c:\users\user\appdata\local\programs\python\python36-32\lib\site-packages\jinja2\parser.py", line 1038, in parse
    result = nodes.Template(self.subparse(), lineno=1)
  File "c:\users\user\appdata\local\programs\python\python36-32\lib\site-packages\jinja2\parser.py", line 1012, in subparse
    add_data(self.parse_tuple(with_condexpr=True))
  File "c:\users\user\appdata\local\programs\python\python36-32\lib\site-packages\jinja2\parser.py", line 725, in parse_tuple
    args.append(parse())
  File "c:\users\user\appdata\local\programs\python\python36-32\lib\site-packages\jinja2\parser.py", line 523, in parse_expression
    return self.parse_condexpr()
  File "c:\users\user\appdata\local\programs\python\python36-32\lib\site-packages\jinja2\parser.py", line 528, in parse_condexpr
    expr1 = self.parse_or()
  File "c:\users\user\appdata\local\programs\python\python36-32\lib\site-packages\jinja2\parser.py", line 543, in parse_or
    left = self.parse_and()
  File "c:\users\user\appdata\local\programs\python\python36-32\lib\site-packages\jinja2\parser.py", line 552, in parse_and
    left = self.parse_not()
  File "c:\users\user\appdata\local\programs\python\python36-32\lib\site-packages\jinja2\parser.py", line 560, in parse_not
    if self.stream.current.test("name:not"):
      AttributeError: 'Token' object has no attribute 'test'

(我没有包括全部错误,这是最后两行)。我使用的python版本是3.6.0。我以前在这台电脑中使用过jupyter笔记本,但我必须创建一个新用户,现在我正在使用该用户编写python代码。我的python版本是否太旧了?这就是我犯这个错误的原因吗?

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题