I do not succeed to install CPLEX's Python API (version 22.1) on a MacBook with M1 chip (macOS Ventura - 13.1). Tried with several Python versions (3.8, 3.9, 3.10).
Steps taken:
python /Applications/CPLEX_Studio221/python/setup.py install
pip list
import cplex
=> ExceptionThe ImportError
is thrown here: from cplex._internal.py310_cplex2210 import *
dlopen(/Users/christian/workspace/venvs/python-examples_3_10_9/lib/python3.10/site-packages/cplex-22.1.0.0-py3.10.egg/cplex/_internal/py310_cplex2210.so, 0x0002): tried: '/Users/christian/workspace/venvs/python-examples_3_10_9/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 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/Users/christian/workspace/venvs/python-examples_3_10_9/lib/python3.10/site-packages/cplex-22.1.0.0-py3.10.egg/cplex/_internal/py310_cplex2210.so' (no such file), '/Users/christian/workspace/venvs/python-examples_3_10_9/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 'arm64'))
Seems something related to the architecture: have 'x86_64', need 'arm64'
, but really no idea what is going on.
You should use CPLEX 22.1.1
With respect to platforms, this release introduces support for Windows Server 2022 and MacOS Ventura. It also adds an ARM64 port for MacOS, allowing users to run CPLEX Optimization Studio natively on this architecture.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.