Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python error importing dateutil

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
like image 640
Asier Gomez Avatar asked May 25 '16 10:05

Asier Gomez


1 Answers

Install python-dateutil

pip install python-dateutil
like image 51
Tanu Avatar answered Nov 04 '22 00:11

Tanu