StructuredOptimization.jl icon indicating copy to clipboard operation
StructuredOptimization.jl copied to clipboard

Package dependancies issues with Julia 1.9

Open enzodesena opened this issue 9 months ago • 1 comments

Ciao @lostella!! Hope you are well. We are looking to use this package for some work, but having troubles installing with Julia 1.9. More specifically, when running the demos (run_demos.jl), the following error pops up:

"ERROR: LoadError: Could not locate the source code for the DelimitedFiles package. Are you trying to use a manifest generated by a different version of Julia?"

Tried upgrading the manifest, but that didn't help. This is running on Mac OS Ventura, and tried both on an Intel and an M1 chip. Thanks a lot!!

In the meantime, in case it is useful to anyone else, this is the only way I managed to get it all to work. Essentially, I went forwards from the version you used around the time when you stopped having loads of commits, which I think is 1.2. Unfortunately, Julia 1.2-1.4 seem to be too old since it is no longer possible to get the necessary packages. The first one to work almost straight out of the box was 1.5. This is what I have done, in detail (apologies for the obvious things--I am a Julia newbie 😄 ):

  1. Download and install Julia 1.5: https://julialang-s3.julialang.org/bin/mac/x64/1.5/julia-1.5.0-mac64.dmg
  2. In the Julia shell:
cd("/your_pwd/StructuredOptimization.jl/demos")
include("run_demos.jl")
  1. Respond “yes” to installing Jupyter with Cuda. There are some installation errors, but it looks like the associated packages are not always needed.
  2. Run e.g. the Sparse Deconvolution demo.
  3. If you get an error about OSQP, ignore the suggestion to use Pkg.Add('OSQP'), which doesn't seem to work. Instead, go back to the Julia shell, close Jupyter, and then type (including the “]”):
]
add OSQP
  1. Press Cntrl+C to exit the package installer
  2. Try again running include("run_demos.jl")

enzodesena avatar Sep 16 '23 14:09 enzodesena

@enzodesena nice to see you here! Yes, I believe the demos folder might be a little outdated. Especially the Manifest file should probably not even be there, and the notebooks opened with something like

# assuming we run commands from the repo root folder
# instantiate the environment
julia --project=./demos -e 'using Pkg; Pkg.instantiate()'
# run notebook 
julia --project=./demos -e 'using IJulia; notebook(dir="./demos")'

But I didn’t run the above as I’m on my phone so I’m not 100% sure. Will give it a try though, let’s see if we can make it to run smoothly again

lostella avatar Sep 16 '23 19:09 lostella