Problems to install CPLEX v 20.10

Dear all,
I had the software CPLEX v 12.8 on my computer and I worked with Julia. Recently, I have removed this version and updated to version 20.10 of this software.
In the instalation of new version I had installed on:
cplex
The next step is set the path to Julia and run:

["CPLEX_STUDIO_BINARIES"] = "C:\Program Files\IBM\ILOG\CPLEX_Studio_Community201\opl\bin\x64_win64\cplex2010.dll"
import Pkg
Pkg.add("CPLEX")
Pkg.build("CPLEX")

However, the error message appears:

ERROR: syntax: invalid escape sequence

What am I doing wrong? Anyone can help me please?

When I build the package,the error message appears:

julia> Pkg.build("CPLEX")
   Building CPLEX → `C:\Users\Usuário\.julia\packages\CPLEX\DgohF\deps\build.log`
┌ Error: Error building `CPLEX`:
│ ERROR: LoadError: Unable to locate CPLEX installation. Note this must be downloaded separately. See the CPLEX.jl README for further instructions.        
│ Stacktrace:
│  [1] error(::String) at .\error.jl:33
│  [2] try_local_installation() at C:\Users\Usuário\.julia\packages\CPLEX\DgohF\deps\build.jl:64
│  [3] top-level scope at C:\Users\Usuário\.julia\packages\CPLEX\DgohF\deps\build.jl:80
│  [4] include(::String) at .\client.jl:457
│  [5] top-level scope at none:5
│ in expression starting at C:\Users\Usuário\.julia\packages\CPLEX\DgohF\deps\build.jl:77
└ @ Pkg.Operations D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\Operations.jl:942

The backslash in strings needs to be escaped, so you should replace all \ with \\. Alternatively, you can use the raw"..." string literal which does that for you:

raw"C:\Program Files\IBM\ILOG\CPLEX_Studio_Community201\opl\bin\x64_win64\cplex2010.dll"

It’s ENV["CPLE_STUDIO_BINARIES"] .

1 Like

Not yet:

julia> Pkg.build("CPLEX")
   Building CPLEX → `C:\Users\Usuário\.julia\packages\CPLEX\DgohF\deps\build.log`
┌ Error: Error building `CPLEX`:
│ INFORMA��ES: n�o foi poss�vel localizar arquivos para o(s) padr�o(�es) especificado(s).
│ ERROR: LoadError: Unable to locate CPLEX installation. Note this must be downloaded separately. See the CPLEX.jl README for further instructions.
│ Stacktrace:
│  [1] error(::String) at .\error.jl:33
│  [2] try_local_installation() at C:\Users\Usuário\.julia\packages\CPLEX\DgohF\deps\build.jl:64
│  [3] top-level scope at C:\Users\Usuário\.julia\packages\CPLEX\DgohF\deps\build.jl:80
│  [4] include(::String) at .\client.jl:457
│  [5] top-level scope at none:5
│ in expression starting at C:\Users\Usuário\.julia\packages\CPLEX\DgohF\deps\build.jl:77
└ @ Pkg.Operations D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\Operations.jl:942

ENV["CPLEX_STUDIO_BINARIES"] = "C:\\Program Files\\CPLEX_Studio1210\\cplex\\bin\\x86-64_win\\" rather than the dll file.