You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from docplex.mp.model import Model
a = Model()
x = a.binary_var()
print(a.add_constraint(x <= 1))
Python 3.8
x1 <= 1
Python 3.9
Traceback (most recent call last):
File "/Users/ima/envs/dev39/lib/python3.9/site-packages/docplex/mp/environment.py", line 290, in get_cplex_module
import cplex #@UnresolvedImport
ModuleNotFoundError: No module named 'cplex'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/ima/tasks/1_2021/qiskit/aqua/tmp/c.py", line 2, in <module>
a = Model()
File "/Users/ima/envs/dev39/lib/python3.9/site-packages/docplex/mp/model.py", line 417, in __init__
self._environment = self._make_environment()
File "/Users/ima/envs/dev39/lib/python3.9/site-packages/docplex/mp/model.py", line 181, in _make_environment
env = Environment.get_default_env()
File "/Users/ima/envs/dev39/lib/python3.9/site-packages/docplex/mp/environment.py", line 427, in get_default_env
Environment._default_env = Environment.make_new_configured_env()
File "/Users/ima/envs/dev39/lib/python3.9/site-packages/docplex/mp/environment.py", line 422, in make_new_configured_env
return Environment(start_auto_configure=True)
File "/Users/ima/envs/dev39/lib/python3.9/site-packages/docplex/mp/environment.py", line 84, in __init__
self.auto_configure(logger=logger)
File "/Users/ima/envs/dev39/lib/python3.9/site-packages/docplex/mp/environment.py", line 220, in auto_configure
self.check_cplex(logger=logger)
File "/Users/ima/envs/dev39/lib/python3.9/site-packages/docplex/mp/environment.py", line 328, in check_cplex
cplex = self.get_cplex_module(logger=logger)
File "/Users/ima/envs/dev39/lib/python3.9/site-packages/docplex/mp/environment.py", line 314, in get_cplex_module
cplex = load_cplex_from_cos_root(loc) if loc else None
File "/Users/ima/envs/dev39/lib/python3.9/site-packages/docplex/mp/environment.py", line 286, in load_cplex_from_cos_root
return load_cplex(full_path, version=version)
File "/Users/ima/envs/dev39/lib/python3.9/site-packages/docplex/mp/environment.py", line 261, in load_cplex
raise FileNotFoundError("Could not load module from %s" % module_location)
FileNotFoundError: Could not load module from /Applications/CPLEX_Studio201/cplex/python/3.9/x86-64osx/cplex/__init__.py
What is the expected behavior?
Suggested solutions
We should configure setup.py and requirements.txt so that Python 3.9 does not install docplex.
The text was updated successfully, but these errors were encountered:
Information
What is the current behavior?
The latest Docplex 2.20.204 does not work with Python 3.9
Related to #24
Steps to reproduce the problem
Python 3.8
Python 3.9
What is the expected behavior?
Suggested solutions
We should configure setup.py and requirements.txt so that Python 3.9 does not install docplex.
The text was updated successfully, but these errors were encountered: