编程语言
首页 > 编程语言> > python2.7安装jupyter报错

python2.7安装jupyter报错

作者:互联网

在python2.7环境使用conda install jupyter安装,然后jupyter notebook报错,如上所示

最后几行,decorator.py

print('Error in generated code:', file=sys.stdrr)

syntaxError: invalid syntax

查询了decorator.py ,发现版本是5.1.0,这个版本支持的是python 3.5,3.6及以上,所以错误原因就是这个包有问题。参见github链接:https://github.com/micheles/decorator/blob/master/docs/documentation.md

解决方法,换掉这个包,pip install decorator==4.4.0

 成功

当然,还有个前提是要保证安装路径没问题。

标签:github,jupyter,py,python2.7,报错,decorator
来源: https://blog.csdn.net/qq_28577809/article/details/121118819