brightway-lca / ecoinvent_interface

Unofficial python interface to ecoinvent data
MIT License
12 stars 5 forks source link

installing the package under python 3.12 fails #19

Closed tngTUDOR closed 6 months ago

tngTUDOR commented 1 year ago

Current

When doing "python -m pip install ecoinvent_interface" in a python=3.12 environment, the installation fails with:

...
Collecting lxml
  Using cached lxml-4.9.2.tar.gz (3.7 MB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [7 lines of output]
      /tmp/pip-install-gp53p6d9/lxml_0e364b4116bd4d7c9728b6f67fdcb15a/setup.py:117: SyntaxWarning: invalid escape sequence '\.'
        is_interesting_header = re.compile('^(zconf|zlib|.*charset)\.h$').match
      /tmp/pip-install-gp53p6d9/lxml_0e364b4116bd4d7c9728b6f67fdcb15a/setup.py:67: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
        import pkg_resources
      Building lxml version 4.9.2.
      Building without Cython.
      Error: Please make sure the libxml2 and libxslt development packages are installed.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

Expected

works under python 3.12

tngTUDOR commented 1 year ago

ecoinvent_interface declares an abstract dependency on lxml (no version pinned), but also on pyecospold which has pinned lxml version to 4.9.2. It seems to me that there are no wheels available for lxml 4.9.2 for linux x86_64 compatible with python 3.12, and hence, installing ecoinvent_interface will try to build lxml instead of grabbing just a binary dist.

tngTUDOR commented 1 year ago

A dependency of pyecospold, lxmlh has also pinned lxml to version 4.9.2.

tngTUDOR commented 1 year ago

if pull requests:

Are merged and accepted, we can test with py312 and update the dependency to pyecospold version

tngTUDOR commented 8 months ago

pyecospold 3.5.3 will have a fix for this once the PR is merged

tngTUDOR commented 8 months ago

fixed. pyecospold version 3.5.3 is python 3.12 ready now.