I can't open the notebooks via IJulia

julia> using IJulia

julia> notebook()
[ Info: running setenv(`'C:\Users\Pedro Luiz\.julia\conda\3\Scripts\jupyter.exe' notebook`,["PATH=C:\\Users\\Pedro Luiz\\.julia\\conda\\3\\Library\\bin;C:\\Users\\Pedro Luiz\\.julia\\conda\\3\\Scripts;C:\\windows\\system32;C:\\windows;C:\\windows\\System32\\Wbem;C:\\windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\windows\\System32\\OpenSSH\\;C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common;C:\\Program Files\\NVIDIA Corporation\\NVIDIA NvDLISR;C:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\DAL;C:\\Program Files\\Intel\\Intel(R) Management Engine Components\\DAL;C:\\Users\\Pedro Luiz\\AppData\\Local\\Microsoft\\WindowsApps", "USERDOMAIN_ROAMINGPROFILE=LAPTOP-P5RCO9KR", "JUPYTER=jupyter", "HOMEPATH=\\Users\\Pedro Luiz", "PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC", "SESSIONNAME=Console", "SYSTEMROOT=C:\\windows", "APPDATA=C:\\Users\\Pedro Luiz\\AppData\\Roaming", "PSMODULEPATH=%ProgramFiles%\\WindowsPowerShell\\Modules;C:\\windows\\system32\\WindowsPowerShell\\v1.0\\Modules", "COMMONPROGRAMW6432=C:\\Program Files\\Common Files", "PROGRAMDATA=C:\\ProgramData", "PUBLIC=C:\\Users\\Public", "OS=Windows_NT", "PROCESSOR_REVISION=8e0b", "TMP=C:\\Users\\PEDROL~1\\AppData\\Local\\Temp", "COMSPEC=C:\\windows\\system32\\cmd.exe", "ALLUSERSPROFILE=C:\\ProgramData", "COMPUTERNAME=LAPTOP-P5RCO9KR", "CONDARC=C:\\Users\\Pedro Luiz\\.julia\\conda\\3\\condarc-julia.yml", "ONEDRIVECONSUMER=C:\\Users\\Pedro Luiz\\OneDrive", "USERPROFILE=C:\\Users\\Pedro Luiz", "PROCESSOR_LEVEL=6", "=C:=C:\\Users\\Pedro Luiz\\AppData\\Local\\Julia-1.3.1", "PROGRAMW6432=C:\\Program Files", "TEMP=C:\\Users\\PEDROL~1\\AppData\\Local\\Temp", "HOMEDRIVE=C:", "PYTHONIOENCODING=UTF-8", "WINDIR=C:\\windows", "LOCALAPPDATA=C:\\Users\\Pedro Luiz\\AppData\\Local", "PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 142 Stepping 11, GenuineIntel", "NUMBER_OF_PROCESSORS=8", "=::=::\\", "COMMONPROGRAMFILES(X86)=C:\\Program Files (x86)\\Common Files", "COMMONPROGRAMFILES=C:\\Program Files\\Common Files", "ONEDRIVE=C:\\Users\\Pedro Luiz\\OneDrive", "PROGRAMFILES(X86)=C:\\Program Files (x86)", "PROGRAMFILES=C:\\Program Files", "LOGONSERVER=\\\\LAPTOP-P5RCO9KR", "DRIVERDATA=C:\\Windows\\System32\\Drivers\\DriverData", "CONDA_PREFIX=C:\\Users\\Pedro Luiz\\.julia\\conda\\3", "FPS_BROWSER_USER_PROFILE_STRING=Default", "SYSTEMDRIVE=C:", "FPS_BROWSER_APP_PROFILE_STRING=Internet Explorer", "PROCESSOR_ARCHITECTURE=AMD64", "OPENBLAS_MAIN_FREE=1"])
Process(setenv(`'C:\Users\Pedro Luiz\.julia\conda\3\Scripts\jupyter.exe' notebook`,["PATH=C:\\Users\\Pedro Luiz\\.julia\\conda\\3\\Library\\bin;C:\\Users\\Pedro Luiz\\.julia\\conda\\3\\Scripts;C:\\windows\\system32;C:\\windows;C:\\windows\\System32\\Wbem;C:\\windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\windows\\System32\\OpenSSH\\;C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common;C:\\Program Files\\NVIDIA Corporation\\NVIDIA NvDLISR;C:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\DAL;C:\\Program Files\\Intel\\Intel(R) Management Engine Components\\DAL;C:\\Users\\Pedro Luiz\\AppData\\Local\\Microsoft\\WindowsApps", "USERDOMAIN_ROAMINGPROFILE=LAPTOP-P5RCO9KR", "JUPYTER=jupyter", "HOMEPATH=\\Users\\Pedro Luiz", "PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC", "SESSIONNAME=Console", "SYSTEMROOT=C:\\windows", "APPDATA=C:\\Users\\Pedro Luiz\\AppData\\Roaming", "PSMODULEPATH=%ProgramFiles%\\WindowsPowerShell\\Modules;C:\\windows\\system32\\WindowsPowerShell\\v1.0\\Modules", "COMMONPROGRAMW6432=C:\\Program Files\\Common Files"  …  "PROGRAMFILES(X86)=C:\\Program Files (x86)", "PROGRAMFILES=C:\\Program Files", "LOGONSERVER=\\\\LAPTOP-P5RCO9KR", "DRIVERDATA=C:\\Windows\\System32\\Drivers\\DriverData", "CONDA_PREFIX=C:\\Users\\Pedro Luiz\\.julia\\conda\\3", "FPS_BROWSER_USER_PROFILE_STRING=Default", "SYSTEMDRIVE=C:", "FPS_BROWSER_APP_PROFILE_STRING=Internet Explorer", "PROCESSOR_ARCHITECTURE=AMD64", "OPENBLAS_MAIN_FREE=1"]; dir="C:\\Users\\Pedro Luiz"), ProcessExited(1))

julia> using Pkg

julia> Pkg.build("IJulia")
  Building Conda ──→ `C:\Users\Pedro Luiz\.julia\packages\Conda\OIHWB\deps\build.log`
  Building MbedTLS → `C:\Users\Pedro Luiz\.julia\packages\MbedTLS\a1JFn\deps\build.log`
  Building IJulia ─→ `C:\Users\Pedro Luiz\.julia\packages\IJulia\yLI42\deps\build.log`
false

julia> ENV["JUPYTER"]=""
""

julia> Pkg.build("IJulia")
  Building Conda ──→ `C:\Users\Pedro Luiz\.julia\packages\Conda\OIHWB\deps\build.log`
  Building MbedTLS → `C:\Users\Pedro Luiz\.julia\packages\MbedTLS\a1JFn\deps\build.log`
  Building IJulia ─→ `C:\Users\Pedro Luiz\.julia\packages\IJulia\yLI42\deps\build.log`
false

The problem could be, that your username contains a space (" Pedro Luiz").
To check could you try the following:

  • Open a CMD window
  • create a Folder e.g. C:\Temp and write at the command prompt:
    SET JULIA_DEPOT_PATH=C:\Temp
  • Start Julia from the same command prompt, it is probably:
    "C:\Users\Pedro Luiz\AppData\Local\Julia-1.3.1\bin\julia.exe"
    (check your version!)
  • Now try again to install and use IJulia (type ] at the julia prompt) to enter Pkg REPL and enter add IJulia
    (v1.3) pkg> add IJulia
    It should install everything in C:\Temp and hopefully without any problems.

To do something similar permanently you should set the environment variable JULIA_DEPOT_PATH at the appropriate windows dialog (check google for “setting environment variable in windows”)

1 Like

Maybe related:

So my suggestion may work but it may be not because if the space in the user name. It may work just because of the forced reinstallation.

I observed a similar problem recently, apparently due to a conflict between the Jupyter (actually Tornado IIRC) and Python versions on Windows in the latest Anaconda (Tornado’s code was using an asyncio feature from Python 3.8). Separately, there was a Windows path problem in IJulia’s notebook() function that was fixed over the weekend.

Try the following things:

  1. Just do pkg> update, restart Julia, and try again with IJulia.notebook().

  2. Do pkg> add Conda and then julia> import Conda; Conda.update(), and try again with IJulia.notebook(), in hopes that Anaconda has fixed this problem.

  3. Do julia> import Conda; Conda.add("python=3.8"), and try again with IJulia.notebook(). This fixed the problem for me last night.

Update: should be fixed by https://github.com/JuliaPy/Conda.jl/pull/170 once this is merged and tagged. The problem was that Conda.jl was pinning Python at 3.6 to fix an issue a couple of years ago, and we forgot to unpin it.

3 Likes