Cannot build CPLEX even with correct environment variable

Hello!

I am trying to add CPLEX to Julia. I download the latest version of CPLEX, 22.1 And also updated the CPLEX.jl package to the latest version, v0.9.4. When running Pkg.build(“CPLEX”), it seems that the path is wrong, so I correct the path to ENV[“CPLEX_STUDIO_BINARIES”] = “/Applications/CPLEX_Studio221/cplex/bin/x86-64_osx/”, which is the correct path. But it still throws the same error. I have attached the screenshot.

Thanks!

Richard.

1 Like

What is versioninfo()?

Note that CPLEX doesn’t support M1 yet: CPLEX.jl does not support Apple M1 · Issue #384 · jump-dev/CPLEX.jl · GitHub

Thanks Oscar for your prompt reply. Julia version is 1.8.1. I see, it is the because I am using an M2 machine. Thanks for pointing it out!

It should work with the Rosetta build of Julia.

1 Like

Hi Richard, I’m having a similar issue. Did you find any solution?

Hi @ekara, welcome to the forum.

Can you please start a new thread, and include the full text of the error you get when installing CPLEX, as well as the output of versioninfo() and import Pkg; Pkg.status().

If you’re using an M1 or M2 Mac, then you need to make sure you’ve installed the matching builds of Julia and CPLEX. So both builds with arm64 in their name, or both builds with x86_64.

1 Like