python – 由于dateutil的语法错误,Jupyter Notebook Anaconda无法打开
作者:互联网
我正在尝试使用Anaconda导航器(在Mac OSX上)打开Jupyter Notebook,但我无法正常打开它.我一直在终端上收到这条消息.
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/parser.py", line 158
l.append("%s=%s" % (attr, `value`))
^
SyntaxError: invalid syntax
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.
[Process completed]
我试过检查我的默认版本的python,它说我的默认版本是python 3.6.然而,当我得到pip并尝试安装dateutil它说
pip install python-dateutil
Requirement already satisfied: python-dateutil in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python
我遇到麻烦,因为我的计算机上有多个版本的python.我能做什么?
解决方法:
我对anconda 4.5.1 python 3.6也有同样的问题.重新安装包解决了我的问题.
pip uninstall python-dateutil
pip install python-dateutil
标签:python-dateutil,python,jupyter-notebook,pip,anaconda 来源: https://codeday.me/bug/20190828/1750132.html