Problem with launching Jupyter notebook in Windows

Hi,

I wanted to launch a jupyter notebook using IJulia. After adding IJulia as a package, I tried notebook(). It asks permission to install Jupyter via Conda.
It throws the following error about permission being denied.

notebook()
install Jupyter via Conda, y/n? [y]: y
[ Info: Running `conda install -y jupyter` in root environment
Collecting package metadata (current_repodata.json): failed

NotWritableError: The current user does not have write permissions to a required path.
  path: C:\Users\Sarthak Choudhury\.julia\conda\3\pkgs\cache\9b8cd901.json


ERROR: failed process: Process(setenv(`'C:\Users\Sarthak Choudhury\.julia\conda\3\Scripts\conda.exe' install -y jupyter`,["PATH=C:\\Users\\Sarthak Choudhury\\.julia\\conda\\3\\Library\\bin;C:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\iCLS\\;C:\\Program Files\\Intel\\Intel(R) Management Engine Components\\iCLS\\;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Windows\\System32\\OpenSSH\\;C:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\DAL;C:\\Program Files\\Intel\\Intel(R) Management Engine Components\\DAL;C:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\IPT;C:\\Program Files\\Intel\\Intel(R) Management Engine Components\\IPT;C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common;C:\\Program Files\\NVIDIA Corporation\\NVIDIA NvDLISR;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\Program Files\\Git\\cmd;C:\\Program Files\\Intel\\WiFi\\bin\\;C:\\Program Files\\Common Files\\Intel\\WirelessCommon\\;C:\\Program Files\\Wolfram Research\\WolframScript\\;C:\\Users\\Sarthak Choudhury\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\Sarthak Choudhury\\AppData\\Local\\Programs\\MiKTeX 2.9\\miktex\\bin\\x64\\;C:\\Users\\Sarthak Choudhury\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\Sarthak Choudhury\\AppData\\Local\\Programs\\Julia-1.6.1\\bin;C:\\Users\\Sarthak Choudhury\\AppData\\Local\\atom\\bin;C:\\\\Users\\\\Sarthak Choudhury\\\\.julia\\\\conda\\\\3\\\\Scripts", "USERDOMAIN_ROAMINGPROFILE=DESKTOP-OR1ARH2", "HOMEPATH=\\Users\\Sarthak Choudhury", "PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC", "NODE_ENV=production", "SYSTEMROOT=C:\\WINDOWS", "APPDATA=C:\\Users\\Sarthak Choudhury\\AppData\\Roaming", "PSMODULEPATH=C:\\Program Files\\WindowsPowerShell\\Modules;C:\\WINDOWS\\system32\\WindowsPowerShell\\v1.0\\Modules", "COMMONPROGRAMW6432=C:\\Program Files\\Common Files", "PROGRAMDATA=C:\\ProgramData"  …  "PROGRAMFILES=C:\\Program Files", "CHROME_CRASHPAD_PIPE_NAME=\\\\.\\pipe\\crashpad_2444_DXEXFLYYWYXZSEUD", "LOGONSERVER=\\\\DESKTOP-OR1ARH2", "DRIVERDATA=C:\\Windows\\System32\\Drivers\\DriverData", "ORIGINAL_XDG_CURRENT_DESKTOP=undefined", "CONDA_PREFIX=C:\\Users\\Sarthak Choudhury\\.julia\\conda\\3", "ATOM_HOME=C:\\Users\\Sarthak Choudhury\\.atom", "SYSTEMDRIVE=C:", "PROCESSOR_ARCHITECTURE=AMD64", "OPENBLAS_MAIN_FREE=1"]), ProcessExited(1)) [1]

Stacktrace:
  [1] pipeline_error
    @ .\process.jl:525 [inlined]
  [2] run(::Cmd; wait::Bool)
    @ Base .\process.jl:440
  [3] run
    @ .\process.jl:438 [inlined]
  [4] runconda(args::Cmd, env::String)
    @ Conda C:\Users\Sarthak Choudhury\.julia\packages\Conda\x5ml4\src\Conda.jl:116
  [5] add(pkg::String, env::String; channel::String)
    @ Conda C:\Users\Sarthak Choudhury\.julia\packages\Conda\x5ml4\src\Conda.jl:190
  [6] add (repeats 2 times)
    @ C:\Users\Sarthak Choudhury\.julia\packages\Conda\x5ml4\src\Conda.jl:189 [inlined]
  [7] find_jupyter_subcommand(subcommand::String)
    @ IJulia C:\Users\Sarthak Choudhury\.julia\packages\IJulia\IDNmS\src\jupyter.jl:23
  [8] notebook(; dir::String, detached::Bool)
    @ IJulia C:\Users\Sarthak Choudhury\.julia\packages\IJulia\IDNmS\src\jupyter.jl:96
  [9] notebook()
    @ IJulia C:\Users\Sarthak Choudhury\.julia\packages\IJulia\IDNmS\src\jupyter.jl:95
 [10] top-level scope
    @ none:1

Would be happy for any help. I am using Julia 1.6.1 and IJulia v1.23.1

1 Like

For the record, faced the same issues here, while following JuliaCon2021 DataFrames.jl Tutorial instructions.

Problem solved by installing Jupyter from the windows PowerShell:

pip install notebook
jupyter notebook

Locating the path for the jupyter.exe and setting the ENV[“JUPYTER”] as per IJulia installation instructions.

1 Like

Thanks a lot. I havent checked it out on my windows machine yet. In the meantime just using Linux, so will definitely get back when I get to the other one.

Hi thanks a lot I think that problem is solved. But if I run any packages from the note book it shows a related error still saying Permission denied. Putting the error code from the jupyter notebook.

SystemError: opening file "C:\\Users\\Sarthak Choudhury\\Project.toml": Permission denied

Stacktrace:
  [1] systemerror(p::String, errno::Int32; extrainfo::Nothing)
    @ Base .\error.jl:168
  [2] #systemerror#62
    @ .\error.jl:167 [inlined]
  [3] systemerror
    @ .\error.jl:167 [inlined]
  [4] open(fname::String; lock::Bool, read::Nothing, write::Nothing, create::Nothing, truncate::Bool, append::Nothing)
    @ Base .\iostream.jl:293
  [5] open(fname::String, mode::String; lock::Bool)
    @ Base .\iostream.jl:355
  [6] open(fname::String, mode::String)
    @ Base .\iostream.jl:355
  [7] open(::Base.var"#322#323"{String, Tuple{}}, ::String, ::Vararg{String, N} where N; kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ Base .\io.jl:328
  [8] open
    @ .\io.jl:328 [inlined]
  [9] write
    @ .\io.jl:420 [inlined]
 [10] write_project
    @ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\project.jl:178 [inlined]
 [11] write_project
    @ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\project.jl:169 [inlined]
 [12] write_project(env::Pkg.Types.EnvCache)
    @ Pkg.Types C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\project.jl:167
 [13] #write_env#106
    @ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Types.jl:1403 [inlined]
 [14] write_env
    @ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Types.jl:1403 [inlined]
 [15] add(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}, new_git::Vector{Base.UUID}; preserve::Pkg.Types.PreserveLevel, platform::Base.BinaryPlatforms.Platform)
    @ Pkg.Operations C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Operations.jl:1239
 [16] add(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}; preserve::Pkg.Types.PreserveLevel, platform::Base.BinaryPlatforms.Platform, kwargs::Base.Iterators.Pairs{Symbol, Base.TTY, Tuple{Symbol}, NamedTuple{(:io,), Tuple{Base.TTY}}})
    @ Pkg.API C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:203
 [17] add(pkgs::Vector{Pkg.Types.PackageSpec}; io::Base.TTY, kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ Pkg.API C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:79
 [18] add(pkgs::Vector{Pkg.Types.PackageSpec})
    @ Pkg.API C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:77
 [19] #add#22
    @ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:74 [inlined]
 [20] add(pkg::Pkg.Types.PackageSpec)
    @ Pkg.API C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:74
 [21] top-level scope
    @ In[2]:1
 [22] eval
    @ .\boot.jl:360 [inlined]
 [23] include_string(mapexpr::typeof(REPL.softscope), mod::Module, code::String, filename::String)
    @ Base .\loading.jl:1094

And cant really use any packages in the notebook. I am thankful for any further help.

It seems to be related to this issue, but sorry, have very limited knowledge on this matter to be of further help.

1 Like

Thanks a lot.