CPLEX和Python 3.7 [英] CPLEX and Python 3.7
问题描述
我正在尝试将cplex与python 3.7.3版一起使用.CPLEX具有3.7版的setup.py,但是当我尝试使用它时,仍然出现错误"CPLEX 12.9.0.0与该版本的Python不兼容".是否有解决方法,还是需要降级到Python 3.6?
I'm trying to use cplex with python version 3.7.3. CPLEX has a setup.py for version 3.7, but when I try to use it I still get the error "CPLEX 12.9.0.0 is not compatible with this version of Python". Is there a workaround for this or do I need to downgrade to Python 3.6?
推荐答案
让我们假设Python 3.7可执行文件位于 C:\ Python37 \ python.exe
,而CPLEX 12.9安装在C:\ Program Files \ IBM \ ILOG \ CPLEX_Studio_Community129
.然后,要安装CPLEX Python API,您将执行以下操作:
Let's assume the Python 3.7 executable is located at C:\Python37\python.exe
and CPLEX 12.9 is installed at C:\Program Files\IBM\ILOG\CPLEX_Studio_Community129
. Then, to install the CPLEX Python API, you would do something like the following:
cd "C:\Program Files\IBM\ILOG\CPLEX_Studio_Community129\cplex\python\3.7\x64_win64\"
C:\Python37\python.exe setup.py install
可以在 查看全文