[Python] Matplotlib requires dateutil

Discussão em 'Python' iniciado por Stack, Julho 29, 2025.

  1. Stack

    Stack Membro Participativo

    I installed matplotlib, tried to run the program, and get an error:

    Traceback (most recent call last):
    File "C:\Users\kystepa2\Desktop\NEXTSY_PROJECT\TEST\mtsa\plot_metrics_mtsa.py", line 2, in <module>
    from matplotlib import pyplot
    File "C:\Users\kystepa2\Desktop\NEXTSY_PROJECT\venv\lib\site-packages\matplotlib\__init__.py", line 263, in <module>
    _check_versions()
    File "C:\Users\kystepa2\Desktop\NEXTSY_PROJECT\venv\lib\site-packages\matplotlib\__init__.py", line 259, in _check_versions
    raise ImportError(f"Matplotlib requires {modname}>={minver}; "
    ImportError: Matplotlib requires dateutil>=2.7; you have 2.2


    I checked that the installed version of python-dateutil is indeed 2.9.0:

    C:\Users\kystepa2>pip show python-dateutil
    Name: python-dateutil
    Version: 2.9.0.post0


    I tried reinstalling matplotlib and python-dateutil, but the error is still the same.

    I tried installing dateutil instead of python-dateutil but got an error:

    C:\Users\kystepa2>pip install dateutil
    ERROR: Could not find a version that satisfies the requirement dateutil (from versions: none)
    ERROR: No matching distribution found for dateutil

    Continue reading...

Compartilhe esta Página