Problem install DifferentialEquations

I have a problem with all the packages related to integrate differential equations.
The error is with AdaptStaticArrayExt:

┌ Error: Error during loading of extension AdaptStaticArraysExt of Adapt, use `Base.retry_load_extensions()` to retry.
│  │   exception =
│  │    1-element ExceptionStack:
│  │    Failed to precompile AdaptStaticArraysExt [e1699a77-9e31-5da8-bb3e-0a796f95f0a0] to "/home/marta/.julia/compiled/v1.10/AdaptStaticArraysExt/jl_Ulpy6M".
│  │    Stacktrace:
│  │      [1] error(s::String)
│  │        @ Base ./error.jl:35
│  │      [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool)
│  │        @ Base ./loading.jl:2468
│  │      [3] compilecache
│  │        @ ./loading.jl:2340 [inlined]
│  │      [4] (::Base.var"#968#969"{Base.PkgId})()
│  │        @ Base ./loading.jl:1974
│  │      [5] mkpidlock(f::Base.var"#968#969"{Base.PkgId}, at::String, pid::Int32; kwopts::@Kwargs{stale_age::Int64, wait::Bool})
│  │        @ FileWatching.Pidfile ~/julia-1.10.3/share/julia/stdlib/v1.10/FileWatching/src/pidfile.jl:93
│  │      [6] #mkpidlock#6
│  │        @ ~/julia-1.10.3/share/julia/stdlib/v1.10/FileWatching/src/pidfile.jl:88 [inlined]
│  │      [7] trymkpidlock(::Function, ::Vararg{Any}; kwargs::@Kwargs{stale_age::Int64})
│  │        @ FileWatching.Pidfile ~/julia-1.10.3/share/julia/stdlib/v1.10/FileWatching/src/pidfile.jl:111
│  │      [8] #invokelatest#2
│  │        @ ./essentials.jl:894 [inlined]
│  │      [9] invokelatest
│  │        @ ./essentials.jl:889 [inlined]
│  │     [10] maybe_cachefile_lock(f::Base.var"#968#969"{Base.PkgId}, pkg::Base.PkgId, srcpath::String; stale_age::Int64)
│  │        @ Base ./loading.jl:2983
│  │     [11] maybe_cachefile_lock
│  │        @ ./loading.jl:2980 [inlined]
│  │     [12] _require(pkg::Base.PkgId, env::Nothing)
│  │        @ Base ./loading.jl:1970
│  │     [13] __require_prelocked(uuidkey::Base.PkgId, env::Nothing)
│  │        @ Base ./loading.jl:1812
│  │     [14] #invoke_in_world#3
│  │        @ ./essentials.jl:926 [inlined]
│  │     [15] invoke_in_world
│  │        @ ./essentials.jl:923 [inlined]
│  │     [16] _require_prelocked
│  │        @ ./loading.jl:1803 [inlined]
│  │     [17] _require_prelocked
│  │        @ ./loading.jl:1802 [inlined]
│  │     [18] run_extension_callbacks(extid::Base.ExtensionId)
│  │        @ Base ./loading.jl:1295
│  │     [19] run_extension_callbacks(pkgid::Base.PkgId)
│  │        @ Base ./loading.jl:1330
│  │     [20] run_package_callbacks(modkey::Base.PkgId)
│  │        @ Base ./loading.jl:1164
│  │     [21] _tryrequire_from_serialized(modkey::Base.PkgId, path::String, ocachepath::String, sourcepath::String, depmods::Vector{Any})
│  │        @ Base ./loading.jl:1487
│  │     [22] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String, build_id::UInt128)
│  │        @ Base ./loading.jl:1574
│  │     [23] _require(pkg::Base.PkgId, env::String)
│  │        @ Base ./loading.jl:1938
│  │     [24] __require_prelocked(uuidkey::Base.PkgId, env::String)
│  │        @ Base ./loading.jl:1812
│  │     [25] #invoke_in_world#3
│  │        @ ./essentials.jl:926 [inlined]
│  │     [26] invoke_in_world
│  │        @ ./essentials.jl:923 [inlined]
│  │     [27] _require_prelocked(uuidkey::Base.PkgId, env::String)
│  │        @ Base ./loading.jl:1803
│  │     [28] macro expansion
│  │        @ ./loading.jl:1790 [inlined]
│  │     [29] macro expansion
│  │        @ ./lock.jl:267 [inlined]
│  │     [30] __require(into::Module, mod::Symbol)
│  │        @ Base ./loading.jl:1753
│  │     [31] #invoke_in_world#3
│  │        @ ./essentials.jl:926 [inlined]
│  │     [32] invoke_in_world
│  │        @ ./essentials.jl:923 [inlined]
│  │     [33] require(into::Module, mod::Symbol)
│  │        @ Base ./loading.jl:1746
│  │     [34] include
│  │        @ ./Base.jl:495 [inlined]
│  │     [35] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::Nothing)
│  │        @ Base ./loading.jl:2222
│  │     [36] top-level scope
│  │        @ stdin:3
│  │     [37] eval
│  │        @ ./boot.jl:385 [inlined]
│  │     [38] include_string(mapexpr::typeof(identity), mod::Module, code::String, filename::String)
│  │        @ Base ./loading.jl:2076
│  │     [39] include_string
│  │        @ ./loading.jl:2086 [inlined]
│  │     [40] exec_options(opts::Base.JLOptions)
│  │        @ Base ./client.jl:316
│  │     [41] _start()
│  │        @ Base ./client.jl:552
│  └ @ Base loading.jl:1301
│  ERROR: LoadError: ArgumentError: Package AdaptStaticArraysCoreExt does not have Adapt in its dependencies:
│  - You may have a partially installed environment. Try `Pkg.instantiate()`
│    to ensure all packages in the environment are installed.
│  - Or, if you have AdaptStaticArraysCoreExt checked out for development and have
│    added Adapt as a dependency but haven't updated your primary
│    environment's manifest file, try `Pkg.resolve()`.
│  - Otherwise you may need to report an issue with AdaptStaticArraysCoreExt
│  Stacktrace:
│   [1] macro expansion
│     @ ./loading.jl:1776 [inlined]
│   [2] macro expansion
│     @ ./lock.jl:267 [inlined]
│   [3] __require(into::Module, mod::Symbol)
│     @ Base ./loading.jl:1753
│   [4] #invoke_in_world#3
│     @ ./essentials.jl:926 [inlined]
│   [5] invoke_in_world
│     @ ./essentials.jl:923 [inlined]
│   [6] require(into::Module, mod::Symbol)
│     @ Base ./loading.jl:1746
│   [7] include
│     @ ./Base.jl:495 [inlined]
│   [8] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::String)
│     @ Base ./loading.jl:2222
│   [9] top-level scope
│     @ stdin:3
│  in expression starting at /home/marta/.julia/packages/Adapt/Ur60R/ext/AdaptStaticArraysExt.jl:1
│  in expression starting at stdin:3
│  ┌ Error: Error during loading of extension AdaptStaticArraysExt of Adapt, use `Base.retry_load_extensions()` to retry.
│  │   exception =
│  │    1-element ExceptionStack:
│  │    Failed to precompile AdaptStaticArraysExt [e1699a77-9e31-5da8-bb3e-0a796f95f0a0] to "/home/marta/.julia/compiled/v1.10/AdaptStaticArraysExt/jl_th8EC1".
│  │    Stacktrace:
│  │      [1] error(s::String)
│  │        @ Base ./error.jl:35
│  │      [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool)
│  │        @ Base ./loading.jl:2468
│  │      [3] compilecache
│  │        @ ./loading.jl:2340 [inlined]
│  │      [4] (::Base.var"#968#969"{Base.PkgId})()
│  │        @ Base ./loading.jl:1974
│  │      [5] mkpidlock(f::Base.var"#968#969"{Base.PkgId}, at::String, pid::Int32; kwopts::@Kwargs{stale_age::Int64, wait::Bool})
│  │        @ FileWatching.Pidfile ~/julia-1.10.3/share/julia/stdlib/v1.10/FileWatching/src/pidfile.jl:93
│  │      [6] #mkpidlock#6
│  │        @ ~/julia-1.10.3/share/julia/stdlib/v1.10/FileWatching/src/pidfile.jl:88 [inlined]
│  │      [7] trymkpidlock(::Function, ::Vararg{Any}; kwargs::@Kwargs{stale_age::Int64})
│  │        @ FileWatching.Pidfile ~/julia-1.10.3/share/julia/stdlib/v1.10/FileWatching/src/pidfile.jl:111
│  │      [8] #invokelatest#2
│  │        @ ./essentials.jl:894 [inlined]
│  │      [9] invokelatest
│  │        @ ./essentials.jl:889 [inlined]
│  │     [10] maybe_cachefile_lock(f::Base.var"#968#969"{Base.PkgId}, pkg::Base.PkgId, srcpath::String; stale_age::Int64)
│  │        @ Base ./loading.jl:2983
│  │     [11] maybe_cachefile_lock
│  │        @ ./loading.jl:2980 [inlined]
│  │     [12] _require(pkg::Base.PkgId, env::Nothing)
│  │        @ Base ./loading.jl:1970
│  │     [13] __require_prelocked(uuidkey::Base.PkgId, env::Nothing)
│  │        @ Base ./loading.jl:1812
│  │     [14] #invoke_in_world#3
│  │        @ ./essentials.jl:926 [inlined]
│  │     [15] invoke_in_world
│  │        @ ./essentials.jl:923 [inlined]
│  │     [16] _require_prelocked
│  │        @ ./loading.jl:1803 [inlined]
│  │     [17] _require_prelocked
│  │        @ ./loading.jl:1802 [inlined]
│  │     [18] run_extension_callbacks(extid::Base.ExtensionId)
│  │        @ Base ./loading.jl:1295
│  │     [19] run_extension_callbacks(pkgid::Base.PkgId)
│  │        @ Base ./loading.jl:1330
│  │     [20] run_package_callbacks(modkey::Base.PkgId)
│  │        @ Base ./loading.jl:1164
│  │     [21] _tryrequire_from_serialized(modkey::Base.PkgId, path::String, ocachepath::String, sourcepath::String, depmods::Vector{Any})
│  │        @ Base ./loading.jl:1487
│  │     [22] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String, build_id::UInt128)
│  │        @ Base ./loading.jl:1574
│  │     [23] _require(pkg::Base.PkgId, env::String)
│  │        @ Base ./loading.jl:1938
│  │     [24] __require_prelocked(uuidkey::Base.PkgId, env::String)
│  │        @ Base ./loading.jl:1812
│  │     [25] #invoke_in_world#3
│  │        @ ./essentials.jl:926 [inlined]
│  │     [26] invoke_in_world
│  │        @ ./essentials.jl:923 [inlined]
│  │     [27] _require_prelocked(uuidkey::Base.PkgId, env::String)
│  │        @ Base ./loading.jl:1803
│  │     [28] macro expansion
│  │        @ ./loading.jl:1790 [inlined]
│  │     [29] macro expansion
│  │        @ ./lock.jl:267 [inlined]
│  │     [30] __require(into::Module, mod::Symbol)
│  │        @ Base ./loading.jl:1753
│  │     [31] #invoke_in_world#3
│  │        @ ./essentials.jl:926 [inlined]
│  │     [32] invoke_in_world
│  │        @ ./essentials.jl:923 [inlined]
│  │     [33] require(into::Module, mod::Symbol)
│  │        @ Base ./loading.jl:1746
│  │     [34] include
│  │        @ ./Base.jl:495 [inlined]
│  │     [35] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::String)
│  │        @ Base ./loading.jl:2222
│  │     [36] top-level scope
│  │        @ stdin:3
│  │     [37] eval
│  │        @ ./boot.jl:385 [inlined]
│  │     [38] include_string(mapexpr::typeof(identity), mod::Module, code::String, filename::String)
│  │        @ Base ./loading.jl:2076
│  │     [39] include_string
│  │        @ ./loading.jl:2086 [inlined]
│  │     [40] exec_options(opts::Base.JLOptions)
│  │        @ Base ./client.jl:316
│  │     [41] _start()
│  │        @ Base ./client.jl:552
│  └ @ Base loading.jl:1301
│  WARNING: Method definition (::Type{Float64})(Base.Irrational{:fourπ}) in module IrrationalConstants at irrationals.jl:233 overwritten in module StatsFuns on the same line (check for duplicate calls to `include`).
│  ERROR: Method overwriting is not permitted during Module precompilation. Use `__precompile__(false)` to opt-out of precompilation.
└  
┌ DiffEqNoiseProcess
│  WARNING: Method definition (::Type{Float64})(Base.Irrational{:fourπ}) in module IrrationalConstants at irrationals.jl:233 overwritten in module StatsFuns on the same line (check for duplicate calls to `include`).
│  ERROR: Method overwriting is not permitted during Module precompilation. Use `__precompile__(false)` to opt-out of precompilation.
└  
┌ Distributions
│  WARNING: Method definition (::Type{Float64})(Base.Irrational{:fourπ}) in module IrrationalConstants at irrationals.jl:233 overwritten in module StatsFuns on the same line (check for duplicate calls to `include`).
│  ERROR: Method overwriting is not permitted during Module precompilation. Use `__precompile__(false)` to opt-out of precompilation.
└  
┌ DiffEqFinancial
│  WARNING: Method definition (::Type{Float64})(Base.Irrational{:fourπ}) in module IrrationalConstants at irrationals.jl:233 overwritten in module StatsFuns on the same line (check for duplicate calls to `include`).
│  ERROR: Method overwriting is not permitted during Module precompilation. Use `__precompile__(false)` to opt-out of precompilation.
└  
┌ DifferentialEquations
│  WARNING: Method definition (::Type{Float64})(Base.Irrational{:fourπ}) in module IrrationalConstants at irrationals.jl:233 overwritten in module StatsFuns on the same line (check for duplicate calls to `include`).
│  ERROR: Method overwriting is not permitted during Module precompilation. Use `__precompile__(false)` to opt-out of precompilation.
└  

I have reinstall from Julia official binaries Julia. Version julia-1.10.3. And Visual code also, it remains the same problem. Does anyone know how to solve it?

What is the output of:

using Pkg
Pkg.status()

Captura de pantalla_2024-05-02_15-13-14

You are using a very old version of DifferentialEquations.jl .

Does it work if you do:

mkdir test
cd test
julia --project="."
using Pkg
pkg"add DifferentialEquations"

?

Is there a reason why you want to use v6.18 of DifferentialEquations? The latest version is v7.13.0 .

Seems to be clearly PlotShapeFiles.jl and UpdateJulia.jl. The latter literally says in bold text at the top of its README:

This package is no longer maintained.

Can you you please remove those and update?

I do know, do i run this in the terminal not in visual code right?

I just installed the DifferentialEquations with Pkg.add(“DifferentialEquations”) so I dont know why I installed an old version instead of the latest. How can I installl the latest?

Regards,
Marta

Please enter this in the terminal. A terminal is also available in VSCod="e, just choose the menu item “Terminal->New Terminal”.

To launch Julia and create a new environment (Project.toml) in the current folder type

julia --project="."

in the terminal. Then you could add the dependencies you need to your local environment.

Or you use the global environment by starting Julia with:

julia

and remove PlotShapeFiles and UpdateJulia type at the Julia prompt:

using Pkg
pkg"rm PlotShapeFiles"
pkg"rm UpdateJulia"

If you then update your environment with:

using Pkg
pkg"update"

you should get the latest versions…

To see which versions are installed type:

using Pkg
pkg"st"

Or you read my blog page: Working with Julia projects | Julia programming notes

I have done this but when installing DifferentialEquations I get the same error as before:
Captura de pantalla_2024-05-02_18-02-37.png

Well, you still have the outdated DifferentialEquations v6.18.0 in your project, so I would say you did NOT execute:

using Pkg
Pkg.update()

Did you try to create an empty project and add just DifferentialEquations?

If that works (and if you get the newest version), then you could start to add the other packages one by one to see if installing one of them downgrades DifferentialEquations…

It seems to me Marta is already working in a project-specific environment, so I assume she needs the pacakges in that environment.

@Marta_Pardo_Araujo you can do ] add DifferentialEquations@7 to force an update of the package, which will error if there are incompatibilities in your environment.

It looks like you still have PlotShapefiles.jl installed, if @ChrisRackauckas is right, then you should should probably uninstall that package.

Judging by the packages in your environment, if you are interested in geospatial data, then the GeoMakie.jl or GMT.jl packages are currently maintained and may be good replacements for plotting shapefiles. I would also recommend checking out JuliaGeo for some other options as well.

This was the problem, there was conflicts if I have installed PlotShapefiles and DifferentialEquations. I remove everything in the environment and install everything apart from the PlotShapefiles and worked

2 Likes