I installed CPLEX Studio 22.1 on my Apple Macbook (M2 CPU). Almost everything seems to be fine:
- I can call
cplex
and cpoptimizer
interactives from /Applications/CPLEX_Studio221/cplex/bin/x86-64_osx/cplex
and /Applications/CPLEX_Studio221/cpoptimizer/bin/x86-64_osx/cpoptimizer
, and can also optimize some examples of mp/cp successfully.
- I installed python packages:
cplex
and docplex
via the commmand
python /Applications/CPLEX_Studio221/python/setup.py install
and it seems to be fine also.
- I tested the system with the command
python -m docplex.cp.check_list
and got the following:
Execution environment:
* System: Darwin, 64bit
* Python version: 3.10.6, 64 bits (/Users/username/.pyenv/versions/3.10.6/Library/Frameworks/Python.framework/Versions/3.10/bin/python)
* Docplex version: 2.23.221
* Optional packages: numpy: 1.23.2, panda: None, matplotlib: 3.5.3
* Solver agent: local, executable file: '/Applications/CPLEX_Studio221/cpoptimizer/bin/x86-64_osx/cpoptimizer'
* Solver version: 22.1.0.0
No problem found.
- HOWEVER, when I tried with
python -m docplex.mp.check_list
, I got
* system is: Darwin 64bit
* Python version 3.10.6, located at: /Users/username/.pyenv/versions/3.10.6/Library/Frameworks/Python.framework/Versions/3.10/bin/python
* docplex is present, version is 2.23.221
* CPLEX library is not available
* pandas is present, version is 1.4.3
Cplex runtime not found, error importing cplex: dlopen(/Users/username/.pyenv/versions/3.10.6/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/cplex-22.1.0.0-py3.10.egg/cplex/_internal/py310_cplex2210.so, 0x0002): tried: '/Users/username/.pyenv/versions/3.10.6/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/cplex-22.1.0.0-py3.10.egg/cplex/_internal/py310_cplex2210.so' (mach-o file, but is an incompatible architecture (have (x86_64), need (arm64e)))
* diagnostics: 1
-- No local installation of CPLEX has been found.
As far as I know, the docplex.cp.model
works here, but docplex.mp.model
failed since the local cplex not found on the system. The variable PYTHONPATH
has been set to /Applications/CPLEX_Studio221/cplex/bin/x86-64_osx/
. I have no ideas what I missed to configure on the installation process.
Moreover, I still get a minor problem when trying to run oplide
. It can not be executed, but oplrun
works fine.
------------------------------
Ratthaprom Promkam
------------------------------
#DecisionOptimization