builtwith:即使在添加了 Python 3 支持之后仍会导入 SyntaxError?
builtwith: import SyntaxError even after Python 3 support is added?
我 运行 pip install builtwith
当我导入这个模块时,我遇到了这个问题:
>>> import builtwith
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/begueradj/flaskDev/lib/python3.5/site-packages/builtwith/__init__.py", line 43
except Exception, e:
^
SyntaxError: invalid syntax
这与 描述的问题相同,答案表明这与 Python3 不兼容。
但我再次询问,因为我从 here 中了解到添加了对 Python3 的支持,所以我不明白为什么我会遇到这个问题...有什么提示吗?
截至 2017 年 11 月 13 日,PyPI 上的版本现在与 Python 3 兼容,并在 setup.py
中正确包含 six
依赖项。下面是旧答案。
PyPI 上的版本太旧;它的日期是 2015 年:
Uploaded on
2015-11-24
此版本不 Python 3 兼容。
source repository indeed has merged in a pull request updating to support Python 3,因此您必须告诉 pip
安装该版本:
pip install hg+https://bitbucket.org/richardpenman/builtwith#egg=builtwith
更改添加了对 six
库的依赖,但没有将其添加到 setup.py
元数据;手动安装。
我 运行 pip install builtwith
当我导入这个模块时,我遇到了这个问题:
>>> import builtwith
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/begueradj/flaskDev/lib/python3.5/site-packages/builtwith/__init__.py", line 43
except Exception, e:
^
SyntaxError: invalid syntax
这与
但我再次询问,因为我从 here 中了解到添加了对 Python3 的支持,所以我不明白为什么我会遇到这个问题...有什么提示吗?
截至 2017 年 11 月 13 日,PyPI 上的版本现在与 Python 3 兼容,并在 setup.py
中正确包含 six
依赖项。下面是旧答案。
PyPI 上的版本太旧;它的日期是 2015 年:
Uploaded on
2015-11-24
此版本不 Python 3 兼容。
source repository indeed has merged in a pull request updating to support Python 3,因此您必须告诉 pip
安装该版本:
pip install hg+https://bitbucket.org/richardpenman/builtwith#egg=builtwith
更改添加了对 six
库的依赖,但没有将其添加到 setup.py
元数据;手动安装。