6

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")

desertnaut
  • 57,590
  • 26
  • 140
  • 166
Jiaming Xu
  • 63
  • 4

2 Answers2

1

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.

logankilpatrick
  • 13,148
  • 7
  • 44
  • 125
  • The first step told me to go to FICO's website but it that mean I need pay for their service? I didn't find some instruction and available resource on the website"https://www.fico.com/products/fico-xpress-solver". Do you know what link is ? – Jiaming Xu Oct 25 '21 at 23:12
  • Yes you need to pay and the magnitute is tens of thousands of dollars. I guess that Fico used to have some academic program - but I am not sure if they still do. Gurobi and CPLEX have free academic programs and both work with JuMP in a similar way. If you want something free and open source try Cbc.jl or GLPK.jl but both are not anywhere so powerful as commercial solvers are. – Przemyslaw Szufel Oct 26 '21 at 21:41
  • @PrzemyslawSzufel FICO XPress still has an academic license that is free of charge, see https://community.fico.com/s/academic-programs. – Daniel Junglas Oct 27 '21 at 07:47
  • @JiamingXu if you are an academic then you can use FICO Xpress for free (for academic purposes), see the instructions at https://community.fico.com/s/academic-programs. There also is a free community license. See the "Get Access to Xpress" menu at https://community.fico.com/s/optimization. – Daniel Junglas Oct 27 '21 at 07:50
0

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
Bryan P
  • 5,900
  • 5
  • 34
  • 49