Closed
Description
Version
- Python-3.12.1
- classiq-0.9.3
- Pyomo-6.0.1
How to replicate this problem
I created a conda environment (Python 3.12.1) and installed classiq (0.9.3).
$ pip install classiq
...
$ python3
>>> import classiq
...
.../lib/python3.12/site-packages/pyomo/core/base/component.py", line 427, in __getstate__
state[key] = val
~~~~~^^^^^
TypeError: 'tuple' object does not support item assignment
>>>
- This issue is not found in my older environment with Python 3.11.4.
- I found a similar issue Issues #2600 is resolved by Pyomo team.
I have tried to force update the Pyomo package to 6.7.1, and imported classiq successfully with only a few deprecation warnings. I wonder this will break anything important.
$ pip install --force pyomo
...
$ python3
>>> import classiq
WARNING: DEPRECATED: the 'EqualityExpression' class has been moved to
'pyomo.core.expr.relational_expr.EqualityExpression'. Please update your
import. (deprecated in 6.4.3) (called from <frozen importlib._bootstrap>:488)
WARNING: DEPRECATED: the 'InequalityExpression' class has been moved to
'pyomo.core.expr.relational_expr.InequalityExpression'. Please update your
import. (deprecated in 6.4.3) (called from <frozen importlib._bootstrap>:488)
>>>
My suggestion
- Update the import code and requirements.txt.
- Use GitHub Actions to make sure mainstream versions can operate without problems.
Metadata
Metadata
Assignees
Labels
No labels