Problems with IJulia

Hi I am using Julia 1.2.
I have a pre-installed version of anaconda -

So before building IJulia I do the following

ENV["PYTHON"]="C:\\ProgramData\\Anaconda3\\python"
ENV["JUPYTER"]="C:\\ProgramData\\Anaconda3\\Scripts\\jupyter"

From hwat I understand this should direct Julia to fins Jupyter and Python ins the desired directories however -

using IJulia
IJulia.notebook()

returns

IJulia.notebook()
install Jupyter via Conda, y/n? [y]: n

I chose no given that I already have working installations, however when I chose y installation failed due to qt package failure.

Any advice?

Thanks,

A

1 Like

Don’t you need .exe at the end?

A simple test to ensure that you have set this correctly (before running pkg> build IJulia) is to check that

run(`$(ENV["JUPYTER"]) --version`)

runs successfully and prints out your Jupyter installation versions.

That’s odd, can you file an issue at Conda.jl with the exact error?

Thanks,

I will file the error next time I try it.

The .exe doesn’t make any difference.

Thanks for the quick reply.

I’ll try the command you suggested as soon as I get back to work.

Thanks again

A

I ran the command as you suggested -
I got

jupyter core : 4.5.0
jupyter-notebook : 6.0.0
qtconsole : 4.5.1
ipython : 7.6.1
ipykernel : 5.1.1
jupyter client : 5.3.1
jupyter lab : 1.0.2
nbconvert : 5.5.0
ipywidgets : 7.5.0
nbformat : 4.4.0
traitlets : 4.3.2
Process('C:\ProgramData\Anaconda3\Scripts\jupyter' --version, ProcessExited(0))

The command did not work until I re-inputed
ENV[“JUPYTER”]=“C:\ProgramData\Anaconda3\Scripts\jupyter”
It seems that julia forgot I alreayd have set up ENV[“JUPYTER”] after i turned it off

Anyway, after checking things were ok I did:

] build IJulia
using IJulia
notebook()

and got
install Jupyter via Conda, y/n? [y]: n

any idea what could be going on?

Thanks,

A

Environment variables do not persist across sessions. However, once you build IJulia, it should subsequently “remember” your JUPYTER setting. If you do

using IJulia
IJulia.JUPYTER

it should be the jupyter path that you specified if things worked correctly.

However, I suspect that you need to add the .exe suffix as I suggested (before running build), because the build script checks that isexecutable(ENV[“JUPYTER”]) returns true to ensure that the path is valid. (If this check failed, it would have printed out a warning during build IJulia … hopefully you aren’t ignoring warning messages?)

2 Likes

No warning messages, but I’ll try to add .exe

Thanks

why are you expecting a warning msg here? you’re just adding a string to a dict.

From this line: IJulia.jl/deps/build.jl at f6ad59bd71675682ddac4ec831a2cc783a8e5392 · JuliaLang/IJulia.jl · GitHub

I see. My bad, I assumed this is a runtime thing.

Hi I tried to add the .exe after. still same response.
The isuse persists even after I uninstalled Anaconda and Julia and reinstalled them.
Any ideas or should I move to an Anaconda thread?
Thanks,

Ale

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


(v1.2) pkg> build IJulia
  Building Conda ─→ `C:\Users\awolf-yadlin\.juliapro\JuliaPro_v1.2.0-1\packages\Conda\kLXeC\deps\build.log`
  Building ZMQ ───→ `C:\Users\awolf-yadlin\.juliapro\JuliaPro_v1.2.0-1\packages\ZMQ\ABGOx\deps\build.log`
  Building IJulia → `C:\Users\awolf-yadlin\.juliapro\JuliaPro_v1.2.0-1\packages\IJulia\cwvsj\deps\build.log`

julia> run(`$(ENV["JUPYTER"]) --version`)
jupyter core     : 4.5.0
jupyter-notebook : 6.0.0
qtconsole        : 4.5.1
ipython          : 7.6.1
ipykernel        : 5.1.1
jupyter client   : 5.3.1
jupyter lab      : 1.0.2
nbconvert        : 5.5.0
ipywidgets       : 7.5.0
nbformat         : 4.4.0
traitlets        : 4.3.2
Process(`'C:\ProgramData\Anaconda3\Scripts\jupyter.exe' --version`, ProcessExited(0))

julia> notebook()
install Jupyter via Conda, y/n? [y]: n
ERROR: C:\Users\ALE-~1\AppData\Local\Temp\Scripts\jupyter.exe is not installed, cannot run notebook

I don’t know why this doesn’t work, but if you just let Julia install its own Conda, then does your previous installation still find the Julia kernel? Last time I tried this I believe it did.

hi when I let it install it own conda it crashes and doesn’t finish install. I’ll try once more so I can copy the error.
Thanks,

Ale

May I also ask what is your Windows build number?

Of course
version 1709 OS build 16299.1387

thanks,
A

What is IJulia.JUPYTER? Does the build.log file contain any more info?

when I do IJulia.JUPYTER I get

“C:\ProgramData\Anaconda3\Scripts\jupyter.exe”

I only found Project Files in IJulia not logs the logs in Julia don’t show anything strange just the environment used. this is the project file

name = “IJulia”
uuid = “7073ff75-c697-5162-941a-fcdaad2a7d2a”
version = “1.20.0”

[deps]
Base64 = “2a0f44e3-6c83-55bd-87e4-b1978d98bd5f”
Conda = “8f4d0f93-b110-5947-807f-2305c1781a2d”
Dates = “ade2ca70-3891-5945-98fb-dc099432e06a”
InteractiveUtils = “b77e0a4c-d291-57a0-90e8-8db25a27a240”
JSON = “682c06a0-de6a-54ab-a142-c8b1cf79cde6”
Markdown = “d6f4376e-aef5-505a-96c1-9c027394607a”
MbedTLS = “739be429-bea8-5141-9913-cc70e7f3736d”
Pkg = “44cfe95a-1eb2-52ea-b672-e2afdf69b78f”
Printf = “de0858da-6303-5e67-8744-51eddeeeb8d7”
REPL = “3fa0cd96-eef1-5676-8a61-b3b8758bbffb”
Random = “9a3f8284-a2c9-5f02-9a11-845980a1fd5c”
SoftGlobalScope = “b85f4697-e234-5449-a836-ec8e2f98b302”
Test = “8dfed614-e22c-5e08-85e1-65c5234f0b40”
UUIDs = “cf7118a7-6976-5b1a-9a39-7adc72f591a4”
ZMQ = “c2297ded-f4af-51ae-bb23-16f91089e4e1”

[compat]
Conda = “≥ 0.1.5”
JSON = “≥ 0.17.0”
MbedTLS = “≥ 0.4.3”
ZMQ = “≥ 1.0.0”
julia = “≥ 0.7.0”

So something weird happened
I did a global upadate of my Julia and packages. I think My IJulia upgraded to version 1.2.0 and that made the difference from 1.1.9, not sure why.
Thanks for walking through this with me, and sorry to have wasted your time - I am still curious what the difference might have been be and if it was an IJulia issue or related to other packages.

Thanks so much for all your help and patience!