# Cplex 32bit windows 32 bit

**URL:** <https://discourse.julialang.org/t/cplex-32bit-windows-32-bit/1365>\
**Category:** Optimization (Mathematical)\
**Created:** [January 9, 2017, 12:06pm UTC](https://discourse.julialang.org/t/cplex-32bit-windows-32-bit/1365 "2017-01-09T12:06:39Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![PLP](https://avatars.discourse-cdn.com/v4/letter/p/ebca7d/32.png) [@PLP](https://discourse.julialang.org/u/PLP)\
**Post date:** [January 9, 2017, 12:06pm UTC](https://discourse.julialang.org/t/cplex-32bit-windows-32-bit/1365/1 "2017-01-09T12:06:39Z")

</div>

Hello

Is there some way to install cplex (Pkg.add(“CPLEX”)) on windows 32 bit ?  
When I to add CPLEX it is written that it could not find the CPLEX installation…

Thanks

---

<div class="post-metadata">

**Author:** ![chkwon](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chkwon/32/3632_2.png) [@chkwon](https://discourse.julialang.org/u/chkwon)\
**Post date:** [January 9, 2017, 1:17pm UTC](https://discourse.julialang.org/t/cplex-32bit-windows-32-bit/1365/2 "2017-01-09T13:17:49Z")

</div>

Did you install the CPLEX software itself? You need to first install CPLEX (commercial or academic license), then install the Julia package.

---

<div class="post-metadata">

**Author:** ![PLP](https://avatars.discourse-cdn.com/v4/letter/p/ebca7d/32.png) [@PLP](https://discourse.julialang.org/u/PLP)\
**Post date:** [January 9, 2017, 1:28pm UTC](https://discourse.julialang.org/t/cplex-32bit-windows-32-bit/1365/3 "2017-01-09T13:28:33Z")

</div>

Yes CPLEX is already installed (I can make it work with python for example )  
Then I tried to do  
Pkg.add(“CPLEX”) in julia but I got a LoadError (Unable to locate CPLEX installation)

I have seen here that it’s not working right now for 32 bit windows:  
[https://github.com/JuliaOpt/CPLEX.jl](https://github.com/JuliaOpt/CPLEX.jl)

so I was wondering if there were some manual way of installing the package…

---

<div class="post-metadata">

**Author:** ![blegat](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/blegat/32/217090_2.png) [@blegat](https://discourse.julialang.org/u/blegat)\
**Post date:** [January 9, 2017, 2:58pm UTC](https://discourse.julialang.org/t/cplex-32bit-windows-32-bit/1365/4 "2017-01-09T14:58:13Z")

</div>

If you want to install in manually, you need to provide a `deps.jl` file in the `build` directory containing:

```julia
const libcplex = "path to CPLEX dll"

```

For example, for me on Linux 64 bits, the content of this file is:

```julia
const libcplex = "/home/blegat/Documents/Install/misc/CPLEX_Studio127/cplex/bin/x86-64_linux/libcplex1270.so"

```

---

<div class="post-metadata">

**Author:** ![PLP](https://avatars.discourse-cdn.com/v4/letter/p/ebca7d/32.png) [@PLP](https://discourse.julialang.org/u/PLP)\
**Post date:** [January 9, 2017, 3:30pm UTC](https://discourse.julialang.org/t/cplex-32bit-windows-32-bit/1365/5 "2017-01-09T15:30:42Z")

</div>

Thanks !  
I created a deps.jl file in ….julia\v0.5\CPLEX\deps having  
const libcplex = “C:\Program Files (x86)\IBM\ILOG\CPLEX\_Studio126\cplex\bin\x86\_win32\cplex1260.dll”

however when I try to do “using CPLEX” in julia I have the following error:

INFO: Precompiling module CPLEX.  
ERROR: LoadError: LoadError: syntax: invalid UTF-8 sequence  
in include\_from\_node1(::String) at .\Loading.jl:488  
…  
while loading C:.….julia\v0.5\CPLEX\src../deps/deps.jl ub expression starting on line 1  
while loading C:\ ….julia\v0.5\CPLEX\src\CPLEX.jl in expression starting on line 10

---

<div class="post-metadata">

**Author:** ![blegat](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/blegat/32/217090_2.png) [@blegat](https://discourse.julialang.org/u/blegat)\
**Post date:** [January 9, 2017, 4:19pm UTC](https://discourse.julialang.org/t/cplex-32bit-windows-32-bit/1365/6 "2017-01-09T16:19:45Z")

</div>

Try to replace all `\ ` by `\\`

---

<div class="post-metadata">

**Author:** ![PLP](https://avatars.discourse-cdn.com/v4/letter/p/ebca7d/32.png) [@PLP](https://discourse.julialang.org/u/PLP)\
**Post date:** [January 9, 2017, 4:26pm UTC](https://discourse.julialang.org/t/cplex-32bit-windows-32-bit/1365/7 "2017-01-09T16:26:21Z")

</div>

Thanks, it’s better but still some problems !

julia\> using CPLEX  
INFO: Precompiling module CPLEX.  
ERROR: LoadError: error compiling version: error compiling version: could not load library “C:\Program Files (x86)\IBM\ILOG\CPLEX\_Studio126\cplex\bin\x86\_win32\cplex1260.dll”  
The operation completed successfully.

in include\_from\_node1(::String) at .\loading.jl:488  
in macro expansion; at .\none:2 [inlined]  
in anonymous at .\<missing\>:?  
in eval(::Module, ::Any) at .\boot.jl:234  
in process\_options(::Base.JLOptions) at .\client.jl:239  
in \_start() at .\client.jl:318  
while loading C:\Users\p00411260.julia\v0.5\CPLEX\src\CPLEX.jl, in expression starting on line 85  
ERROR: Failed to precompile CPLEX to C:\Users\p00411260.julia\lib\v0.5\CPLEX.ji.  
in compilecache(::String) at .\loading.jl:593  
in require(::Symbol) at .\loading.jl:422

julia\>

---

<div class="post-metadata">

**Author:** ![blegat](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/blegat/32/217090_2.png) [@blegat](https://discourse.julialang.org/u/blegat)\
**Post date:** [January 9, 2017, 6:35pm UTC](https://discourse.julialang.org/t/cplex-32bit-windows-32-bit/1365/8 "2017-01-09T18:35:08Z")

</div>

No idea what could cause this ☹  
@miles.lubin any idea ?

---

<div class="post-metadata">

**Author:** ![miles.lubin](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/miles.lubin/32/279_2.png) [@miles.lubin](https://discourse.julialang.org/u/miles.lubin)\
**Post date:** [January 9, 2017, 6:41pm UTC](https://discourse.julialang.org/t/cplex-32bit-windows-32-bit/1365/9 "2017-01-09T18:41:51Z")

</div>

I don’t recall the reason why 32-bit cplex didn’t work on windows. It will need manual investigation.

@PLP, I would recommend contacting the CPLEX team at IBM and letting them know you’d like to call CPLEX from Julia.
