Updating Julia, IJulia

Yes, CTRL+C gets back to the Julia prompt on Windows!

1 Like

Where did C:\Users\Ken\Documents\MimiFUND.jl-3.13.0 come from? It looks like you downloaded a zip file of the package, and then unzipped it.

Yes, I downloaded MimiFUND.jl-3.13.0.zip
From GitHub - fund-model/MimiFUND.jl: FUND - Climate Framework for Uncertainty, Negotiation and Distribution
I clicked on the ā€œLatestā€ button at Releases, v.3.13.0
and under ā€œAssetsā€, clicked on ā€œSource code (zip)ā€
Then, in Julia, at the Pkg> prompt, I entered add MimiFUND

Iā€™m not sure why you downloaded the zip file. ] add MimiFund should have been sufficient for the package.

I suppose it might be easier to access the notebook this way. Iā€™m still confused about why we are also activating the downloaded environment.

@davidanthoff are you still involved with this package?

The old MimiFUND was located in a different folder, like. C:\Users\Ken\Documents\MimiFUND.jl-3.12.1
This is now in my recycle bin. I assumed that Julia would not know where to add the new version of MiniFUND. I am not sure exactly what Pkg> add MimiFUND does. Does this download the latest MimiFUND version and put it in the C:\Users\Ken\Documents\ folder?
Using Notebook, I just open a .jypnb file in the new MimiFUND.ji-3.13.0 folder

@mkitti I am. I only skimmed this exchange here, my advice to @KGregory would probably be to read or watch some info on how the Julia package manager works. MimiFUND.jl really just follows very standard Julia patterns.

Whatā€™s thr recommended way of using the Jupyter notebooks?

My original question was why doesnā€™t the instruction work at the IJulia quick start of

Install IJulia from the Julia REPL by pressing ] , then enter: add IJulia.

It seems that these instructions are missing the step julia>using Pkg and /or
Julia> import Pkg

The import definition is

import Foo will load the module or package Foo. Names from the imported Foo module can be accessed with dot syntax (e.g. Foo.foo to access the name foo).

The using definition is

using Foo will load the module or package Foo and make its [export]ed names available for direct use. Names can also be used via dot syntax (e.g. Foo.foo to access the name foo), whether they are exported or not.

This suggests that I should have entered julia>import Pkg or julia>using Pkg before
REPL>add IJulia. Is this correct? Should the IJulia quick start instruction include this step before stating enter: add IJulia ?

If you just push ] in the Julia REPL, it will enter you into the Pkg REPL where the command add IJulia would be valid.

That is the key sequence ] add Julia is equivalent to using Pkg; Pkg.add("IJulia"). When explaining things, I prefer to offer the latter syntax because itā€™s both what you type and exactly what you see in the REPL. The former key sequence produces a display (@v1.9) pkg> add IJulia that looks different than what you type, which can be confusing for beginners.

The notebooks actually are all Python, they contain code that was used to calibrate the model. When they were created (more than 10 years ago), the model was still written in C#, the model itself was later ported to Julia.

There isnā€™t a recommended way to run them. The last time I ran any Python code is a long time ago, so Iā€™m also not really up-to-speed about the best way to set up a Python Jupyter environment, but Iā€™m pretty sure there must be a ton of documentation out there on how to do that, doesnā€™t strike me as an unusual thing. This entire IJulia question in this thread here is probably a bit of a red herring, as these notebooks donā€™t even contain any Julia code :slight_smile:

2 Likes

Oof, ok. There really is not a reason to download the zip file at all then!

Additionally, I would really recommend that the OP consider https://plutojl.org/ over Jupyter/IJulia . The package management situation is much more straightforward there among other things.

Looks like there previously was an IJulia notebook in the examples folder that was removed from the repo last year. Maybe thatā€™s the one @KGregory has explored before and was trying to revive using updated Julia and package versions?

The readme still says ā€œTo run the example IJulia notebook file you need to install IJuliaā€, so that might be another source of confusion. Though to be fair, the readme also warns about the package being deliberately difficult to use.

1 Like