Reputation: 747
I am trying to run an optimization program using pulp and cplex I have installed cplex studio. I have change the path name as instructed
Name: Path
C:\Program Files\IBM\ILOG\CPLEX_Studio_Community129\cplex\python\3.7\x64_win64\cplex\_internal
but I am still receiving the error CPLEX_PY: Not Available. I was wondering if anyone else was able to solve this problem or what I'm missing.
Upvotes: 0
Views: 1361
Reputation: 4465
At first, I thought you were trying to use the CPLEX_CMD solver, but I see that you want to use CPLEX_PY instead. The former relies on the CPLEX interactive (cplex.exe
) being in your PATH
environment variable. The later requires that you either install the CPLEX Python API or include it in your PYTHONPATH
environment variable. Please see the documentation here for setting up the CPLEX Python API.
Based on what you have in your question, you could run setup.py
like so:
cd "C:\Program Files\IBM\ILOG\CPLEX_Studio_Community129\cplex\python\3.7\x64_win64"
python setup.py install
Or, you could add the following to PYTHONPATH
:
C:\Program Files\IBM\ILOG\CPLEX_Studio_Community129\cplex\python\3.7\x64_win64
See how to do this here.
In any case, you need to make sure that you can do the following from the python prompt:
>>> import cplex
Also, make sure you are using a 64-bit python.
Upvotes: 2