[Solved] ImportError: No module named enum

I changed from Win XP 32bit to Win7 64bit and reinstalled Python 2.7
and the Anaconda package.

However, it seems like it isn’t properly installed.
When I do

import enum 

There is the error:

ImportError: No module named enum

However, when I try import pandas it works.

When typing help() and modules within Ipython nothing happens.

Any idea how to go from here?

Solution #1:

Or run a pip install --upgrade pip enum34

Respondent: Dark Star1

Solution #2:

I ran into this same issue trying to install the dbf package in Python 2.7. The problem is that the enum package wasn’t added to Python until version 3.4.

It has been backported to versions 3.3, 3.2, 3.1, 2.7, 2.6, 2.5, and 2.4, you just need the package from here:
https://pypi.python.org/pypi/enum34#downloads

Respondent: Jonathan Kunze

Solution #3:

I ran into this issue with Python 3.6 and Python 3.7. The top answer (running pip install --upgrade pip enum34) did not solve the problem.


I don’t know why, but the reason why this error happen is because enum.py was missing from .venv/myvenv/lib/python3.7/.

But the file was in /usr/lib/python3.7/.

Following this answer, I just created the symbolic link by myself :

ln -s /usr/lib/python3.7/enum.py .venv/myvenv/lib/python3.7/enum.py
Respondent: Astariul

Solution #4:

Please use –user at end of this, it is working fine for me.

pip install enum34 --user
Respondent: Riti verma

Solution #5:

soved renaming file from ‘enum.py(same name of import)’ to ‘myEnum(or anything else)’

Respondent: chiliexe

Solution #6:

Depending on your rights, you need sudo at beginning.

Respondent: Spochtfreund

The answers/resolutions are collected from stackoverflow, are licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0 .

Leave a Reply

Your email address will not be published.