我正在尝试使用 Pip 安装 Python 包enum和Treedict。Python 是 v.3.7.3,Pip 是 v.19.1.1。我使用 PyCharm 作为我的 IDE。
我收到以下错误消息:
Treedict:
ERROR: Complete output from command python setup.py egg_info:
File "<string>", line 1, in <module>
File "...\pycharm-packaging\treedict\setup.py",
line 96
print "+++++++++++++++++++"
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("+++++++++++++++++++")?
枚举:
Collecting enum
Using cached https://files.pythonhosted.org/packages/02/a0/32e1d5a21b703f600183e205aafc6773577e16429af5ad3c3f9b956b07ca/enum-0.4.7.tar.gz
ERROR: Complete output from command python setup.py egg_info:
ERROR: Traceback (most recent call last):
File "<string>", line 1, in <module>
File "...\Python\Python37\lib\site-packages\setuptools\__init__.py", line 6, in <module>
import distutils.core
File "...\Python\Python37\lib\distutils\core.py", line 16, in <module>
from distutils.dist import Distribution
File "...\Python\Python37\lib\distutils\dist.py", line 9, in <module>
import re
File "...\Python\Python37\lib\re.py", line 143, in <module>
class RegexFlag(enum.IntFlag):
AttributeError: module 'enum' has no attribute 'IntFlag
ERROR: Command "python setup.py egg_info" failed with error code 1 in ...\pip-install-lke25k9k\treedict\
一些软件包,例如 numpy 和 cython 安装成功,但不知何故,没有。任何帮助表示赞赏。谢谢。