Python3.12 and python3.12 ParserError

Hi everyone,

I was trying to install a fresh version of indico, on AlmaLinux 9.
Before upgrading our CentOS 7 based system.

From what I understand there is some kind of inconsistency between python 3.12 and python-dateutil

File “/opt/indico/.venv/lib/python3.12/site-packages/indico/modules/categories/blueprint.py”, line 12, in
from indico.modules.categories.controllers.display import (RHCategoryCalendarView, RHCategoryCalendarViewEvents,
File “/opt/indico/.venv/lib/python3.12/site-packages/indico/modules/categories/controllers/display.py”, line 17, in
from dateutil.parser import ParserError
ImportError: cannot import name ‘ParserError’ from ‘dateutil.parser’ (/opt/indico/.venv/lib/python3.12/site-packages/dateutil/parser/init.py)

$ python -V
Python 3.12.5

Is there any way around this?

Is this a really fresh install or did you somehow try to copy a venvs from another system? If yes, I strongly recommend you to do this to get a clean environment:

deactivate
rm -rf ~/.venv
python -m venv ~/.venv
source ~/.venv/bin/activate
pip install indico

(also install any plugins etc you may need)


If this is a FRESH installation it’s really weird, because we pin all the dependencies, so you should have exactly the dateutil version that’s required. What does pip freeze | grep dateutil show you?

I don’t know what exactly the problem was, but this solution works.
Thanks