Ubuntu 16.04, Python 2.7 - ImportError: no module named enum

First time using Ubuntu. I installed Anaconda 4.1.1 (Python 2.7). I tried to use an enumeration, but I had an import error.

import enum Traceback (most recent call last): File "<ipython-input-1-13948d6bb7b8>", line 1, in <module> import enum ImportError: No module named enum 

I tried using: conda install -c menpo enum = 0.4.4 but this did not work.

I also tried installing enum from this link - https://pypi.python.org/pypi/enum34#downloads

None of these solutions work for me yet.

Any help would be greatly appreciated. Thanks!

+5
source share
1 answer

Try pip install enum34 . Enum is in Python 3 stdlib. enum34 is a backport.

+5
source

All Articles