richb01 richb01 - 1 month ago 20
Python Question

No module named dateutil.parser

I'm installing Rapidpro which uses django. I'm running

python manage.py runserver


I get an error:

Traceback (most recent call last):
File "manage.py", line 9, in <module>
execute_from_command_line(sys.argv)
File "/home/osboxes/dev/projects/rapidpro/rapidpro/env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 385, in execute_from_command_line
utility.execute()
File "/home/osboxes/dev/projects/rapidpro/rapidpro/env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 354, in execute
django.setup()
File "/home/osboxes/dev/projects/rapidpro/rapidpro/env/local/lib/python2.7/site-packages/django/__init__.py", line 21, in setup
apps.populate(settings.INSTALLED_APPS)
File "/home/osboxes/dev/projects/rapidpro/rapidpro/env/local/lib/python2.7/site-packages/django/apps/registry.py", line 85, in populate
app_config = AppConfig.create(entry)
File "/home/osboxes/dev/projects/rapidpro/rapidpro/env/local/lib/python2.7/site-packages/django/apps/config.py", line 123, in create
import_module(entry)
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/home/osboxes/dev/projects/rapidpro/rapidpro/temba/utils/__init__.py", line 9, in <module>
from dateutil.parser import parse
ImportError: No module named dateutil.parser


I have followed the steps in this post: ImportError: No module named dateutil.parser, but to no avail! (Both untaring and using pip)

I'm a complete python noob, so it's quite possible I'm overlooking something obvious. I'm installing on Ubuntu 15.04.

Ideas? Thanks!

Answer

You need to install python-dateutil.

pip install python-dateutil 

If you are using a virtualenv make sure you activate the environment before running the pip install and also before you run the manage script as well.