Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No module named dateutil.parser [duplicate]

Tags:

python

django

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!

like image 778
richb01 Avatar asked Sep 03 '15 19:09

richb01


People also ask

How do you fix ModuleNotFoundError No module named dateutil?

The Python "ModuleNotFoundError: No module named 'dateutil'" occurs when we forget to install the python-dateutil module before importing it or install it in an incorrect environment. To solve the error, install the module by running the pip install python-dateutil command.

Is dateutil included in Python 3?

dateutil is a third party module. It has recently been ported to Python 3 with dateutil 2.0, and the parser functions was ported as well. So the replacement is dateutil.

Is dateutil part of Python standard library?

The dateutil module specializes in providing an extension of features to the existing datetime module, and as such, the installation of the datetime module is a prerequisite. However, since it's a part of the Python standard library, there's nothing to worry about.


1 Answers

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.

like image 102
Du D. Avatar answered Sep 30 '22 05:09

Du D.