2017-07-03 219 views
-1

我首先通過水蟒和未來的文件中所提及以下jupyter筆記本安裝錯誤

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

兩種方式下面

提到,我得到了同樣的錯誤的正常蟒蛇的方式安裝在Ubuntu jupyter筆記本
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. 
+0

嘗試這種'圓周率p安裝jinja2 --upgrade'。 – shivsn

+0

@shivsn非常感謝。有效 – jasonAngular

回答

0

很高興它的工作:

pip install jinja2 --upgrade