安装 dbf- 没有名为 enum 的模块

Install dbf- no module named enum

我正在尝试安装 dbf 模块 - 见下文 link。

https://pypi.python.org/pypi/dbf

当我在命令提示符下安装模块时,收到以下无效语法错误:

    C:\Users\dbf-0.96.005>python setup.py install
    C:\Python27\lib\distutils\dist.py:267: UserWarning: Unknown distribution  option: 'install_requires'
warnings.warn(msg)
running install
running build
running build_py
running install_lib
byte-compiling C:\Python27\Lib\site-packages\dbf\ver_33.py to ver_33.pyc
File "C:\Python27\Lib\site-packages\dbf\ver_33.py", line 2577 raise DbfError<"unable to write updates to disk, original data restored: %r"X<exc,>> from None
            ^
SyntaxError: invalid syntax

running install_egg_info
Removing C:\Python27\Lib\site-packages\dbf-0.96.005-py2.7.egg-info
Writing C:\Python27\Lib\site-packages\dbf-0.96.005-py2.7.egg-info
C:\Users\dbf-0.96.005>

然后,如果我尝试在 Interpreter 中导入 dbf,我会得到:

Traceback (most recent call last):
  File "W:/Engineering/ENGINEER/LAMP (062012)/Database/VisualDatabase/test", line 1, in <module>
    import dbf
  File "C:\Python27\ArcGIS10.3\lib\site-packages\dbf\__init__.py", line 11, in <module>
    from dbf import ver_2 as _dbf
  File "C:\Python27\ArcGIS10.3\lib\site-packages\dbf\ver_2.py", line 49, in <module>
    from enum import Enum, IntEnum
ImportError: No module named enum
>>> 

我需要安装 Enum 吗?有我需要的 Enum 版本吗?

抱歉,我一定是把我创建的最后一个包搞砸了。

做一个

pip install enum34

第一。