Tuesday, February 1, 2022

[SOLVED] No module named dateutil.parser after dateutil

Issue

Python : 3.6.2
PIP : 9.0.1
virtualenv : 15.1.0 

By Referring this href="https://stackoverflow.com/questions/20853474/importerror-no-module-named-dateutil-parser">No module named dateutil.parser

I installed python-dateutil in virutalenv

    (website) ❯ pip install python-dateutil  
    Collecting python-dateutil
      Using cached python_dateutil-2.6.1-py2.py3-none-any.whl
    Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.6/site-packages (from python-dateutil)
    Installing collected packages: python-dateutil
    Successfully installed python-dateutil-2.6.1

But when i tried to import this in python shell

>>> from dateparser.date import DateDataParser
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'dateparser'
>>> 

what can be the issue ?


Solution

For dateparser.date you need to install dateparser. It's completely independent from python-dateutil.

pip install dateparser


Answered By - phd
Answer Checked By - Pedro (WPSolving Volunteer)