[Python] AttributeError: module 'dateutil' has no attribute 'relativedelta' [closed]

Discussão em 'Python' iniciado por Stack, Junho 10, 2025.

  1. Stack

    Stack Membro Participativo

    On ubuntu. I am trying to use relative delta and it gives me this error. I am using a venv and is still confused. Here are my datas: Python: 3.13.4 Dateutil: 2.8.2 Desired Behavior: Use or relativedelta to modify system time syncing.

    Suspected Problem: Installing issues with Dateutil. don't know how to resolve though. Just gets this: ERROR: Could not find a version that satisfies the requirement dateutil (from versions: none) ERROR: No matching distribution found for dateutil

    Code:

    Minimal Reproduce Example:

    import dateutil
    from datetime import date


    print(date(2003,5,31)+ dateutil.relativedelta.relativedelta(months=-1))


    Error: Traceback (most recent call last): File "/home/max/PycharmProjects/ISMD-Mapper/main.py", line 6, in print(date(2003,5,31)+ dateutil.relativedelta(months=-1)) ^^^^^^^^^^^^^^^^^^^^^^ AttributeError: module 'dateutil' has no attribute 'relativedelta'

    Continue reading...

Compartilhe esta Página