Closed miikanissi closed 2 months ago
Per https://github.com/odoo/odoo/blob/17.0/requirements.txt#L19-L20, lxml 4.8.0 or 4.9.2 is required, depending on Python version.
Per https://github.com/odoo/docker/blob/master/17.0/Dockerfile#L72-L80, a Debian package containing odoo is installed.
Per pip3 show odoo
Name: odoo
Version: 15.0.post20240325
Summary: Odoo Server
Home-page: https://www.odoo.com
Author: OpenERP S.A.
Author-email: info@odoo.com
License: LGPL-3
Location: /usr/lib/python3/dist-packages
Requires:
Required-by:
that package has no requirements?
Where is lxml being installed?
Edit: https://github.com/odoo/odoo/blob/15.0/setup.cfg#L20, but there does not appear to be a corresponding line in https://github.com/odoo/odoo/blob/17.0/setup.cfg
@miikanissi I think this is a good issue, but I don't think it will get the attention it deserves in this repository. Would you mind creating it back on odoo/odoo as a packaging issue? I don't think there's anything docker-specific to this problem.
This was actually an issue caused by another pip package I installed which required lxml. This caused lxml to upgrade to 5.2.1
. The base image works fine and as per Odoo requirements has lxml 4.8.0
installed.
I'll be closing this issue as it's not relevant here.
However, I wonder if in the Odoo setup.py the package should be pinned to a version below 5.2.0
: https://github.com/odoo/odoo/blob/d17290425e9e790e2c855385eec91b1ba9d1692f/setup.py#L36
Receiving an error
ImportError: lxml.html.clean module is now a separate project lxml_html_clean
with Odoo 17.0. This seems to be due to lxml version >=5.2.0 moved the lxml.html.clean into a separate project.I attempted to modify the Dockerfile to additionally install lxml[html_clean]. This got rid of the aforementioned error but now I'm getting
lxml.html.clean' has no attribute 'defs'
error.A workaround I found was to pin the lxml version as <=5.1.1 which allows Odoo 17.0 to run.