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

时间:2016-05-27 16:43:46

标签: enums module install dbf arcpy

我正在尝试安装dbf模块 - 请参阅下面的链接。

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吗?

1 个答案:

答案 0 :(得分:0)

抱歉,我必须填写我创建的最后一个包。

做一个

pip install enum34

第一