I previously used an Julia 1.5 with the IJulia notebook to run an Mimi package.
I installed the new version of Julia via julia-1.9.3-win64.exe.
The new path is C:\Users\Ken\AppData\Local\Programs\Julia-1.9.3\bin
The IJulia quick start GitHub - JuliaLang/IJulia.jl: Julia kernel for Jupyter
says Install IJulia from the Julia REPL by pressing ] , then enter: add IJulia.
This gives errors;
Updating registry at C:\Users\Ken\.julia\registries\General
ERROR: GitError(Code:ENOTFOUND, Class:Config, config value ‘safe.directory’ was not found)
The IJulia page says " Alternatively, you can have IJulia create and manage its own Python/Jupyter installation. To do this, type the following in Julia, at the julia> prompt:
using IJulia
This gives errors;
Package IJulia not found, but a package named IJulia is available from a
registry.
Install package?
(@v1.9) pkg> add IJulia
(y/n/o) [y]:
Updating registry at C:\Users\Ken\.julia\registries\General
ERROR: GitError(Code:ENOTFOUND, Class:Config, config value ‘safe.directory’ was not found)
Both methods give the same error.
This other IJulia page Installation · IJulia
says "… If you install a new Julia binary (or do anything that changes the location of Julia on your computer), you must update the IJulia installation (to tell Jupyter where to find the new Julia) by running Pkg.build(“IJulia”)
at the Julia command line.
This gives errors;
ERROR: UndefvarError: ‘Pkg’ not defined
The two IJulia pages give different instructions, neither apparently work.
Please provide instructions so that I can run the IJulia and notebook.
Sorry to see you having such troubles getting going.
I don’t think this is an error with IJulia: it seems that there is a problem with the package installation process. Can you install another unrelated package, like DataFrames ?
I am running Windows10.
I changes “C:\Users\Ken.julia\registries” to “C:\Users\Ken.julia\registries_old”.
At the julia> prompt I entered; rpath = joinpath(DEPOT_PATH[1], “registries”)
Julia returned: “C:\users\Ken.julia\registries”
I entered; mv(rpath, rpath *“_old”)
Julia returned: ERROR: ArgumentError: 'C:\users\Ken.julia\registries_old" exists. ‘force=true’ is required to remove ‘C:\users\Ken.julia\registries_old’ before moving.
I am not sure what that is asking me to do. What is my next step?
at the pkg> prompt I entered; add DataFrames
Julia returned;
Installing known registries into C:\Users\Ken\.julia
Updating registry at C:\Users\Ken\.julia\registries\General.toml
Resolving package versions…
Installed Crayons ──────────── v4.1.1
…
Precompiling project…
25 dependencies successfully precompiled in 61 seconds. 5 already precompiled.
pkg> So it installed fine.
I repeated as you requested and got the same error message.
That is, I changed C:\Users\Ken.julia\registries to C:\Users\Ken.julia\registries_old2
At the julia> prompt I entered; rpath = joinpath(DEPOT_PATH[1], “registries”)
Julia returned: “C:\users\Ken.julia\registries”
I entered; mv(rpath, rpath *“_old2”)
Julia returned: ERROR: ArgumentError: 'C:\users\Ken.julia\registries_old2" exists. ‘force=true’ is required to remove ‘C:\users\Ken.julia\registries_old2’ before moving.
I didn’t see why repeating what I did before would get a successful result.
I entered at the prompt;
Julia> import pkg
Julia> using IJulia
Julia> notebook()
The Jupyter notebook opened.
I opened the file; Documents/MimiFUND.jl-3.13.0/examples/fund_demo.ipynb
The notebook shows “Kernel Error”, so from the menu I selected; Kernel> Change kernel> which shows Julia 1.2, 1.4, 1.5.3.
There is no Julia 1.9.3 listed.
How can I make the Jupter notebook to recognize Julia 1.9.3 version?
I don’t know what triple backticks are. What key strokes? I can use the quotes is this window’s menu. I used the command;
julia> Pkg.build(“IJulia”)
That worked. Thanks.
Question: When I enter;
Julia> notebook()
Julia gives many lines of info with a flashing cursor on the last line, and the notebook opens in a brower. I hoped that clicking on “Logout” at the top to the notebook would cause the Julia window to display the Julia prompt but it doesn’t.
How do I return to a Julia prompt without closing the Julia window and restarting Julia?
You are almost there, just one button to the right (looks like </>), it will insert two lines with triple backticks.
Even if you close the browser, the notebook’s kernel will still run. This can be quite handy if you don’t want to accidentally lose the session when closing the window. If you want your Julia prompt back, you can hit CTRL+C. It might be that this keyboard combination will not work on Windows, I have no idea. In UNIX-like systems CTRL+C sends a keyboard-interrupt signal. On windows it’s the “copy to clipboard” command but it depends on what kind of terminal/powershell you use (I have no experience running this stuff on Windows). Maybe try SHIFT+CTRL+C if CTRL+C has no effect…
OK, this worked. MimiFUND now runs fine in the notebook.
Note that I was just following the instruction. The notebook error only says to Run Pkg.instantiate(). It doesn’t say to run using Pkg before that. This error message should be fixed.
Thanks for your help
Now I want to understand where my updating Julia, IJulia, Mimi and MimiFUND went wrong. I’ll reply to your next message soon.