using Xpress failed

293 Views Asked by At

when I type using Xpress it show me two errors. One is

LoadError: XPRESS cannot be loaded. Please run Pkg.build("Xpress")

and another is

Failed to precompile Xpress [9e70acf3-d6c9-5be6-b5bd-4e2c73e3e054] to C:\Users\cys\.julia\compiled\v1.6\Xpress\jl_7C6D.tmp.

I tried to solve it by Pkg.build("Xpress") but it show me

ERROR: Error building `Xpress`:
ERROR: LoadError: Unable to locate Xpress installation.
Please check your enviroment variable XPRESSDIR.
Note that Xpress must be obtained separately from fico.com.

using XpressPkg.build("Xpress")

2

There are 2 best solutions below

4
logankilpatrick On BEST ANSWER

Please follow the installation instructions mentioned here: https://github.com/jump-dev/Xpress.jl#install which go into the perquisites installs required before you can successfully type using Xpress.

0
Bryan P On

If you are using a Mac with an Apple Silicon Chip (M1/M2) you have to use the Intel/Rosetta version of Julia to work with Xpress (as of 2023), otherwise you get this same error. (Thanks @oscar-dowson from his comment at this SO answer)

To do so, uninstall the Apple Silicon version of Julia and replace it with the latest/desired x86 version from https://julialang.org/downloads/. (It is also possible to have multiple Julia versions installed, if desired, but this requires care in which is being used, especially if on the same version number)

Then the following should work:

$ julia
julia> ]
pkg> add Xpress

Tested with:

  • Julia: v1.9.2
  • Xpress.jl: v0.16.1