简体   繁体   中英

jupyter notebook installation error

I installed jupyter notebook in ubuntu first through anaconda and next the normal python way as mentioned in the documentation below

http://jupyter.readthedocs.io/en/latest/install.html

Both the ways, i get the same error as mentioned below

 TemplateAssertionError: no filter named 'urlencode'
[E 18:05:35.432 NotebookApp] Uncaught exception in write_error
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/tornado/web.py", line 1036, in send_error
    self.write_error(status_code, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/notebook/base/handlers.py", line 416, in write_error
    html = self.render_template('error.html', **ns)
  File "/usr/local/lib/python2.7/dist-packages/notebook/base/handlers.py", line 348, in render_template
    return template.render(**ns)
  File "/usr/local/lib/python2.7/dist-packages/jinja2/environment.py", line 894, in render
    return self.environment.handle_exception(exc_info, True)
  File "/usr/local/lib/python2.7/dist-packages/notebook/templates/page.html", line 107, in template
    data-jupyter-api-token="{{token | urlencode}}"

TemplateAssertionError: no filter named 'urlencode'
[E 18:05:35.433 NotebookApp] {
  "Accept-Language": "en-US,en;q=0.8", 
  "Accept-Encoding": "gzip, deflate, br", 
  "Host": "localhost:8888", 
  "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", 
  "User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36", 
  "Connection": "keep-alive", 
  "Cookie": "_xsrf=4f322a9ab22d422ebb6c3b3e2726afcf; username-localhost-8888=\"2|1:0|10:1499085248|23:username-localhost-8888|44:MjI5MGRhNjQxYzJiNDIzNWE2NDYyNzkyYjQxNTZlODE=|83797f5d04917430cca0eb57b6a2236997d44b4ef947f4b4593002c0581126cc\"", 
  "Upgrade-Insecure-Requests": "1"
}
[E 18:05:35.433 NotebookApp] 500 GET /tree?
token=8be5097d15e6080bbca336420a1ea0043667d2851638824c (127.0.0.1) 
43.12ms referer=None
Created new window in existing browser session.

很高兴它起作用:

pip install jinja2 --upgrade

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM