Saqib Ali
Saqib Ali

Reputation: 12585

Why doesn't django-enumfield work as advertised in the manual?

I am am following these instructions exactly to install and run django-enumfields. But as you can see below, it is not working. Has anyone else gotten this module to work?

$ sudo pip install django-enumfield
  Downloading/unpacking django-enumfield
  Downloading django-enumfield-1.0.1.tar.gz
  Running setup.py (path:/private/tmp/pip_build_root/django-enumfield/setup.py) egg_info for package django-enumfield

Installing collected packages: django-enumfield
  Running setup.py install for django-enumfield

Successfully installed django-enumfield
Cleaning up...


$ python
Python 2.7.5 (default, Aug 25 2013, 00:04:04)
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin
Type "help", "copyright", "credits" or "license" for more information.


>>> from django_enumfield import enum
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named django_enumfield


>>> from django-enumfield import enum
File "<stdin>", line 1
from django-enumfield import enum
           ^
SyntaxError: invalid syntax
>>>

Upvotes: 2

Views: 899

Answers (1)

Saqib Ali
Saqib Ali

Reputation: 12585

Thank you to @SaeX. My $PYTHONPATH was not set correctly. Oops.

Upvotes: 1

Related Questions