# Qiskit not finding CPLEX

I'm trying to use the CPLEX library alongside Qiskit but keep getting the error.

 File "C:\Users\charl\.conda\envs\quantum\lib\site-packages\qiskit\optimization\algorithms\cplex_optimizer.py", line 58, in __init__
raise MissingOptionalLibraryError(
qiskit.aqua.missing_optional_library_error.MissingOptionalLibraryError: "The 'CPLEX' library is required to use 'CplexOptimizer'. You can install it with 'pip install qiskit-aqua[cplex]'."


Now when of course run that command, I find that all these packages are already installed.

When I tried manually updating docplex, I got a warning saying the latest version was incompatible with qiskit and so I downgraded using pip to docplex 2.15.194, yet I still get the error.

What can I do to get docplex and Qiskit to talk to one another ?

I am using a windows 10 installation of qiskit in a conda environment.

• Just a wild guess, if pip install qiskit-aqua[cplex] didn't work, have you tried conda install qiskit-aqua[cplex] as you said you are using a conda environment? I've never used conda personally, hence it's just a wild guess. Mar 15, 2021 at 14:42
• Hi @Rammus, I've tried that but no dice: I think pip and conda act differently in this situation. I think the only role conda has played in this is just creating the environment ! Thanks all the same ! Mar 15, 2021 at 14:56