This question already has answers here:
ImportError: No module named dateutil.parser

(11个答案)


2年前关闭。




我正在安装使用Django的Rapidpro。我正在运行python manage.py runserver
我收到一个错误:
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

我已经按照这篇文章中的步骤操作:ImportError: No module named dateutil.parser,但无济于事! (同时打开和使用点子)

我是一个完整的python noob,所以很有可能我忽略了一些明显的东西。我正在Ubuntu 15.04上安装。

有想法吗?谢谢!

最佳答案

您需要安装python-dateutil。

pip install python-dateutil

如果您使用virtualenv,请确保在运行pip安装之前以及在运行管理脚本之前已激活环境。

10-08 19:18