IJulia do not run

I manage to install IJulia, but when I want to run the notebook () command, I get the following alerts:

(@v1.5) pkg> add IJulia
   Updating registry at `C:\Users\hermesr\.julia\registries\General`
  Resolving package versions...
  Installed VersionParsing ── v1.2.0
  Installed SoftGlobalScope ─ v1.1.0
  Installed ZeroMQ_jll ────── v4.3.2+4
  Installed Conda ─────────── v1.4.1
  Installed ZMQ ───────────── v1.2.1
  Installed IJulia ────────── v1.21.3
Updating `C:\Users\hermesr\.julia\environments\v1.5\Project.toml`
  [7073ff75] + IJulia v1.21.3
Updating `C:\Users\hermesr\.julia\environments\v1.5\Manifest.toml`
  [8f4d0f93] + Conda v1.4.1
  [7073ff75] + IJulia v1.21.3
  [b85f4697] + SoftGlobalScope v1.1.0
  [81def892] + VersionParsing v1.2.0
  [c2297ded] + ZMQ v1.2.1
  [8f1865be] + ZeroMQ_jll v4.3.2+4
  [7b1f6079] + FileWatching
   Building Conda ─→ `C:\Users\hermesr\.julia\packages\Conda\3rPhK\deps\build.log`
   Building IJulia → `C:\Users\hermesr\.julia\packages\IJulia\tOM8L\deps\build.log`

julia> using IJulia
[ Info: Precompiling IJulia [7073ff75-c697-5162-941a-fcdaad2a7d2a]

julia> notebook()
install Jupyter via Conda, y/n? [y]: y
[ Info: Downloading miniconda installer ...
[ Info: Installing miniconda ...
ERROR: IOError: could not spawn `'C:\Users\hermesr\.julia\conda\3\installer.exe' /S /AddToPath=0 /RegisterPython=0 '/D=C:\Users\hermesr\.julia\conda\3'`: unknown error (UNKNOWN)
Stacktrace:
 [1] _spawn_primitive(::String, ::Cmd, ::Array{Any,1}) at .\process.jl:99
 [2] #585 at .\process.jl:112 [inlined]
 [3] setup_stdios(::Base.var"#585#586"{Cmd}, ::Array{Any,1}) at .\process.jl:196
 [4] _spawn at .\process.jl:111 [inlined]
 [5] run(::Cmd; wait::Bool) at .\process.jl:439
 [6] run at .\process.jl:438 [inlined]
 [7] _install_conda(::String, ::Bool) at C:\Users\hermesr\.julia\packages\Conda\3rPhK\src\Conda.jl:172
 [8] _install_conda(::String) at C:\Users\hermesr\.julia\packages\Conda\3rPhK\src\Conda.jl:155
 [9] runconda(::Cmd, ::String) at C:\Users\hermesr\.julia\packages\Conda\3rPhK\src\Conda.jl:112
 [10] add(::String, ::String; channel::String) at C:\Users\hermesr\.julia\packages\Conda\3rPhK\src\Conda.jl:188
 [11] add at C:\Users\hermesr\.julia\packages\Conda\3rPhK\src\Conda.jl:187 [inlined] (repeats 2 times)
 [12] find_jupyter_subcommand(::String) at C:\Users\hermesr\.julia\packages\IJulia\tOM8L\src\jupyter.jl:23
 [13] notebook(; dir::String, detached::Bool) at C:\Users\hermesr\.julia\packages\IJulia\tOM8L\src\jupyter.jl:96
 [14] notebook() at C:\Users\hermesr\.julia\packages\IJulia\tOM8L\src\jupyter.jl:95
 [15] top-level scope at REPL[4]:1
 [16] include_string(::Function, ::Module, ::String, ::String) at .\loading.jl:1088

julia> 

How to proceed ?

I think the first question is if you install miniconda in Julia directly (i.e., using add as you did with IJulia). If you cannot the problem is with that package, if you can, the problem happens after it is installed. In this last case, you can run that windows command that appears in the console log. If you cannot, the problem is that some files/folders that should exist do not exist, if you can, then there is some problem inside Julia add.

(@v1.5) pkg> add miniconda
   Updating registry at `C:\Users\hermesr\.julia\registries\General`
ERROR: The following package names could not be resolved:
 * miniconda (not found in project, manifest or registry)

Where can I find miniconda?
is it correct what I do, (add miniconda)?

did you try
Troubleshooting · IJulia ?

Otherwise, install pyton&jupyter yourself (anaconda?) and follow the instructions at
Installation · IJulia (perhaps best to completely remove your current installation before you do this)

Or, skip jupyter and use nteract instead:
https://julialang.github.io/IJulia.jl/stable/manual/running/#Running-nteract

@herAdri I really like usin gthe Chocolatey package manager in Windows

choco install Julia
choco install miniconda
Then run the Julia repl and install IJulia

2 Likes

Also if you are using an interactive notebook please look at the lovely Pluto.jl package

From Anaconda Navigator, I can start Jupyter and create a new Notebook with Julia !!! But from Julia herself I can’t go through IJulia to a Notebook!!!

did you run (from Julia)
ENV["JUPYTER"] = "C:\\Miniconda3\\Scripts\\jupyter.exe" (change path as needed) before build IJulia?

I had something similar when going from 1.4 to 1.5. I didn’t found out what was going on but renaming (home)/.julia to something else like .juliaXXX, starting Julia 1.5, ] instantiate, and ] add ing all packages new resolved the problem.

julia> Pkg.rm("IJulia")
Updating `C:\Users\hermesr\.julia\environments\v1.5\Project.toml`
  [7073ff75] - IJulia v1.21.3
Updating `C:\Users\hermesr\.julia\environments\v1.5\Manifest.toml`
  [7073ff75] - IJulia v1.21.3
  [b85f4697] - SoftGlobalScope v1.1.0
  [c2297ded] - ZMQ v1.2.1
  [8f1865be] - ZeroMQ_jll v4.3.2+4
  [7b1f6079] - FileWatching

julia> ENV["JUPYTER"] ="C:\\Users\\hermesr\\Anaconda3\\Scripts\\jupyter.exe"
"C:\\Users\\hermesr\\Anaconda3\\Scripts\\jupyter.exe"

julia> Pkg.add("IJulia")
   Updating registry at `C:\Users\hermesr\.julia\registries\General`
  Resolving package versions...
Updating `C:\Users\hermesr\.julia\environments\v1.5\Project.toml`
  [7073ff75] + IJulia v1.21.3
Updating `C:\Users\hermesr\.julia\environments\v1.5\Manifest.toml`
  [7073ff75] + IJulia v1.21.3
  [b85f4697] + SoftGlobalScope v1.1.0
  [c2297ded] + ZMQ v1.2.1
  [8f1865be] + ZeroMQ_jll v4.3.2+4
  [7b1f6079] + FileWatching

julia> using IJulia

julia> notebook()
install Jupyter via Conda, y/n? [y]: y
[ Info: Downloading miniconda installer ...
[ Info: Installing miniconda ...
ERROR: IOError: could not spawn `'C:\Users\hermesr\.julia\conda\3\installer.exe' /S /AddToPath=0 /RegisterPython=0 '/D=C:\Users\hermesr\.julia\conda\3'`: unknown error (UNKNOWN)
Stacktrace:
 [1] _spawn_primitive(::String, ::Cmd, ::Array{Any,1}) at .\process.jl:99
 [2] #585 at .\process.jl:112 [inlined]
 [3] setup_stdios(::Base.var"#585#586"{Cmd}, ::Array{Any,1}) at .\process.jl:196
 [4] _spawn at .\process.jl:111 [inlined]
 [5] run(::Cmd; wait::Bool) at .\process.jl:439
 [6] run at .\process.jl:438 [inlined]
 [7] _install_conda(::String, ::Bool) at C:\Users\hermesr\.julia\packages\Conda\3rPhK\src\Conda.jl:172
 [8] _install_conda(::String) at C:\Users\hermesr\.julia\packages\Conda\3rPhK\src\Conda.jl:155
 [9] runconda(::Cmd, ::String) at C:\Users\hermesr\.julia\packages\Conda\3rPhK\src\Conda.jl:112
 [10] add(::String, ::String; channel::String) at C:\Users\hermesr\.julia\packages\Conda\3rPhK\src\Conda.jl:188
 [11] add at C:\Users\hermesr\.julia\packages\Conda\3rPhK\src\Conda.jl:187 [inlined] (repeats 2 times)
 [12] find_jupyter_subcommand(::String) at C:\Users\hermesr\.julia\packages\IJulia\tOM8L\src\jupyter.jl:23
 [13] notebook(; dir::String, detached::Bool) at C:\Users\hermesr\.julia\packages\IJulia\tOM8L\src\jupyter.jl:96
 [14] notebook() at C:\Users\hermesr\.julia\packages\IJulia\tOM8L\src\jupyter.jl:95
 [15] top-level scope at REPL[8]:1

julia> notebook()
install Jupyter via Conda, y/n? [y]: n
ERROR: C:\Users\hermesr\.julia\conda\3\Scripts\jupyter.exe is not installed, cannot run notebook
Stacktrace:
 [1] error(::String) at .\error.jl:33
 [2] find_jupyter_subcommand(::String) at C:\Users\hermesr\.julia\packages\IJulia\tOM8L\src\jupyter.jl:25
 [3] notebook(; dir::String, detached::Bool) at C:\Users\hermesr\.julia\packages\IJulia\tOM8L\src\jupyter.jl:96
 [4] notebook() at C:\Users\hermesr\.julia\packages\IJulia\tOM8L\src\jupyter.jl:95
 [5] top-level scope at REPL[8]:100:

Please can you give more details of what was your procedure?

In the filesystem of the operating system rename the folder .julia, which is located in your home directory, to something else. Renaming because you may want to restore it, if the procedure doesn’t help.
So rename

C:\Users\hermesr\.julia

to

C:\Users\hermesr\.juliaXXX

Than start Julia and press the key ] to enter the Pkg-Repl.
Enter

instantiate

and return.
It looks like

(@v1.5) pkg> instantiate

After this just add IJulia and run notebook() as you were trying and see if it works now.

For me it was the package Queryverse which needs some python3 to call somewhere, but it errored out. After renaming and doing above steps it just worked.

There are a few similar discussions here with the same “solution” (it is not really a good solution as it doesn’t solve the unknown underlying issue).

I can’t change the folder name.

All running Julia/VSCode must be closed to rename the folder.

I shut down all the programs that were running, and I still can’t change the folder name

Do you have some issues with access rights to this folder? This folder and all content should have full rights for user “hermesr”. This may also explain the general issues you have.

It is now quite difficult to help from remote through this discussion and it seems that you only have some rudimentary skills regarding Windows. So, maybe you could ask some local skilled person to help with renaming folder “.julia”?

Following from @oheil question - do you have Administrative rights on your Windows laptop?

And repeating myself (sorry) I really do like the Chocolatey package manager. IT makes Windows so much more easy to deal with.

welcome to

Pluto is already running !!

I do not have all the administrative rights. It’s the work PC!
Can I count on Chocolate?

So far I have advanced:

What is happening now ?!

ulia> using IJulia

julia> notebook()
[ Info: running `'C:\Users\hermesr\Anaconda3\Scripts\jupyter.exe' notebook`
Process(setenv(`'C:\Users\hermesr\Anaconda3\Scripts\jupyter.exe' notebook`; dir="C:\\Users\\hermesr"), ProcessExited(1))

julia>