Python error importing dateutil

Asier Gomez picture Asier Gomez · May 25, 2016 · Viewed 14.4k times · Source

I try to execute marathon-lb.py and it throws the next error:

Traceback (most recent call last):
  File "./marathon_lb.py", line 46, in <module>
    import dateutil.parser
ImportError: No module named 'dateutil'

I just install python with apt and with pip. I have run:

sudo apt-get install python-pip
pip install python-dateutil

I compile the script with: python -m py_compile script.py

python application:

from operator import attrgetter
from shutil import move
from tempfile import mkstemp
from wsgiref.simple_server import make_server
from six.moves.urllib import parse
from itertools import cycle
from common import *
from config import *
from lrucache import *
from utils import *

import argparse
import json
import logging
import os
import os.path
import stat
import re
import requests
import shlex
import subprocess
import sys
import time
import dateutil.parser

Answer

Tanu picture Tanu · May 25, 2016

Install python-dateutil

pip install python-dateutil