I am running a tutorial: 02-advanced_ODE_solving in a Jupyter notebook. I got part of the way down the notebook, and eventually got an error that indicated a routine was not found. I am using Julia 1.31 . If there is a better place to post this, please let me know. Thanks.
you might want to join the chat room for these quicker questions. When you updated DiffEqTutorials, what version did you get? Your last issue sounded like you hit a version clash, and I put out a release today to fix some upper bound issues given what you saw.
That should be enough, and it can be done in a notebook. If that doesn’t work, then I’ll need to see your ]st. But last night after tagging I was able to ]add DiffEqTutorials and got v0.3.0 with the right package versions, so in a clean install it should be good to go.
SparsityDetection isn’t actually running the code. It’s using that input information to know the structure of the inputs, and then determines what the connectivity of the variables would be in order to get the sparsity pattern for the Jacobian. So it doesn’t need or use the values at all.
Yeah so you don’t have last night’s tutorial update. Maybe it’s not serving it to you because of package bounds? Try and force it: ]add DiffEqTutorials@0.3.0
Ok, I did not realize that it was the tutorial that was updated. I downloaded it to my computer using git.
Your approach is an alternative. I am working outside Atom when using notebooks. That is not the preferred approach ?
This took me to the notebook. I opened the 02… tutorial. Then I typed the following inside a cell
] status
and got the message that I had an empty environment.
Project DiffEqTutorials v0.3.0
Status ~/.julia/packages/DiffEqTutorials/1VbcB/Project.toml
(empty environment)
Then I typed:
using DifferentialEq
which executed fine. But then:
using Plots
gave the error:
ArgumentError: Package Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80] is required but does not seem to be installed:
Run Pkg.instantiate() to install all recorded dependencies.
Stacktrace:
[1] _require(::Base.PkgId) at ./loading.jl:998
[2] require(::Base.PkgId) at ./loading.jl:927
[3] require(::Module, ::Symbol) at ./loading.jl:922
[4] top-level scope at In[16]:2
Question: Why would DifferentialEquations package load and Plots not load?
Question: What is the expected default environment when a notebook is loaded from within Juno?
Oh, I guess the issue is that yes, the tutorials does not put all of its dependencies into your global environment when it runs on its own. When building the tutorials I always do:
using Pkg, DiffEqTutorials
cd(joinpath(dirname(pathof(DiffEqTutorials)), ".."))
Pkg.pkg"activate ."
Pkg.pkg"instantiate"
No worries. And I’m using you as a guinni pig instead of leading you straight to the answer, which here would’ve been “just run the code bits in whatever and add the packages on your own”. I wanna make sure the tutorials just “install and run” , but indeed hacking it onto the package system doesn’t work perfectly because Julia naturally shields the dependencies of a package from a user’s main environment (for good reason). I might want to work around that… or as part of the tutorial tell people to enter the environment? Hard to tell.