Decision Optimization

 View Only

 Missing Python Folder in CPLEX Studio IDE 22.1.2 (Academic License)

Jiwon Baek's profile image
Jiwon Baek posted Tue April 22, 2025 11:59 PM

Hi everyone,

I recently installed CPLEX Optimization Studio IDE 22.1.2 using an academic license obtained through IBM SkillsBuild. However, I noticed that the installation did not create a python folder inside the CPLEX directory. Because of this, I'm unable to link the Python API via the command window as I would normally expect.

Has anyone else encountered this issue or know why the Python folder is no longer included?

To add some context: I can see that cplex is installed in my Anaconda environment, which adds to my confusion. On StackOverflow, someone mentioned that recent versions of CPLEX no longer include the Python API in the installation folder and that we should now install it separately using pip install cplex.

However, what I actually want to use is docplex. One thing I’ve confirmed is that when I install docplex via pip install docplex, it runs as a community edition.

But here's the catch: I do have CPLEX installed locally under an academic license. So my question is:

  • Is there a way to verify whether the cplex package installed in my Anaconda environment is running under the community edition or academic/commercial edition?

  • And is it still expected that the official CPLEX Studio installation no longer includes the Python API folder?

I’d really appreciate any clarification or guidance.

Thanks in advance!

Suman Suhag's profile image
Suman Suhag

Hi

import docplex.mp.model as cpx
import os

model = cpx.Model(name="example_model")
if 'CPLEX_STUDIO_DIR' in os.environ:
    print("Using local CPLEX installation with docplex")
    model.solve()
    print("Solve status:", model.get_solve_status())
else:
    print("Using community edition CPLEX")