Search code examples
enumsmoduleinstallationdbfarcpy

Install dbf- no module named enum


I am trying to install the dbf module- see below link.

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

When I install the module in the Command Prompt, I receive the following invalid syntax error:

    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>

Then, if I try to import dbf in Interpreter, I get:

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

Do I need to install Enum? Is there a version of Enum I need?


Solution

  • Sorry, I must have foobarred the last package I created.

    Do a

    pip install enum34
    

    first.