Tim-Salzmann / l4casadi

Use PyTorch Models with CasADi for data-driven optimization or learning-based optimal control. Supports Acados.
MIT License
337 stars 22 forks source link

from importlib.resources import files #2

Closed alhaddad-m closed 1 year ago

alhaddad-m commented 1 year ago

Hi Tim, executing examples files shows the following error even though the requirments all satesfied when pip3 install . is executed. In version before last updating, I could run readme.pywithout any error but there were some errors when running other files (acados.py and simple_nlp). With last update, the following error with all files.

Traceback (most recent call last):
  File "readme.py", line 3, in <module>
    import l4casadi as l4c
  File "/home/vladislav/.local/lib/python3.8/site-packages/l4casadi/__init__.py", line 1, in <module>
    from importlib.resources import files
ImportError: cannot import name 'files' from 'importlib.resources' (/usr/lib/python3.8/importlib/resources.py)

OS. Ubuntu 20.04

Best, Muhammad

Tim-Salzmann commented 1 year ago

Hi Muhammad,

Please make sure you are on Python 3.9 or higher. I added this as an explicit requirement in the README and pyproject.toml.

Let me know if this helps.

Best Tim

alhaddad-m commented 1 year ago

Yes, It has fixed my issue. Thank you.