【问题标题】:Install dbf- no module named enum安装 dbf - 没有名为 enum 的模块
【发布时间】:2016-05-27 16:43:46
【问题描述】:

我正在尝试安装 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>

然后,如果我尝试在解释器中导入 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 版本吗?

【问题讨论】:

    标签: enums module installation dbf arcpy


    【解决方案1】:

    抱歉,我一定是对我创建的最后一个包进行了 foobarred 操作。

    做一个

    pip install enum34
    

    首先。

    【讨论】:

      猜你喜欢
      • 2018-05-23
      • 2015-01-21
      • 2018-10-10
      • 2018-01-05
      • 2020-10-01
      • 1970-01-01
      • 1970-01-01
      • 2019-11-12
      • 2016-12-07
      相关资源
      最近更新 更多