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

匿名 (未验证) 提交于 2019-12-03 01:38:01

问题:

First time using Ubuntu. I installed Anaconda 4.1.1 (Python 2.7). I was trying to use enum but I got 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 it didn't work.

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

None of these solutions have worked for me so far.

Any help would be greatly appreciated. Thanks!

回答1:

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



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!