JuliaLang / IJulia.jl

Julia kernel for Jupyter
MIT License
2.78k stars 409 forks source link

Julia kernel died in Jupyter notebook and Pkg.build("IJulia") also fails #761

Closed LittleBeannie closed 5 years ago

LittleBeannie commented 5 years ago

Hello all, I am new to Julia and Jupyter notebook. My Julia kernel keep dying and Pkg.build("IJulia") also fails. The following is the error message. Could anyone help me with that? I appreciate lots for your warm-hearted help!

ERROR: LoadError: Failed to precompile IJulia [7073ff75-c697-5162-941a-fcdaad2a7d2a] to C:\Users\xh9\.julia\compiled\v1.0\IJulia\nfu7T.ji.
Stacktrace:
[1] error(::String) at .\error.jl:33
[2] macro expansion at .\logging.jl:313 [inlined]
[3] compilecache(::Base.PkgId, ::String) at .\loading.jl:1184
[4] _require(::Base.PkgId) at .\logging.jl:311
[5] require(::Base.PkgId) at .\loading.jl:852
[6] macro expansion at .\logging.jl:311 [inlined]
[7] require(::Module, ::Symbol) at .\loading.jl:834
[8] include at .\boot.jl:317 [inlined]
[9] include_relative(::Module, ::String) at .\loading.jl:1038
[10] include(::Module, ::String) at .\sysimg.jl:29
[11] exec_options(::Base.JLOptions) at .\client.jl:229
[12] _start() at .\client.jl:421
in expression starting at C:\Users\xh9\.julia\packages\IJulia\4VL8h\src\kernel.jl:1
[I 16:57:32.668 NotebookApp] KernelRestarter: restarting kernel (1/5), keep random ports
kernel e6fced9e-5afe-4332-a7b8-6819eee4e5aa restarted
[ Info: Precompiling IJulia [7073ff75-c697-5162-941a-fcdaad2a7d2a]
ERROR: LoadError: IJulia not properly installed. Please run Pkg.build("IJulia")
Stacktrace:
[1] error(::String) at .\error.jl:33
[2] top-level scope at none:0
[3] include at .\boot.jl:317 [inlined]
[4] include_relative(::Module, ::String) at .\loading.jl:1038
[5] include(::Module, ::String) at .\sysimg.jl:29
[6] top-level scope at none:2
[7] eval at .\boot.jl:319 [inlined]
[8] eval(::Expr) at .\client.jl:389
[9] top-level scope at .\none:3
in expression starting at C:\Users\xh9\.julia\packages\IJulia\0cLgR\src\IJulia.jl:45
ERROR: LoadError: Failed to precompile IJulia [7073ff75-c697-5162-941a-fcdaad2a7d2a] to C:\Users\xh9\.julia\compiled\v1.0\IJulia\nfu7T.ji.
-----
When I run `Pkg.build("IJulia")`, new error message appears:
julia> using Pkg

julia> Pkg.build("IJulia")
  Building Conda ──→ `C:\Users\xh9\.julia\packages\Conda\uQitS\deps\build.log`
  Building ZMQ ────→ `C:\Users\xh9\.julia\packages\ZMQ\ABGOx\deps\build.log`
  Building MbedTLS → `C:\Users\xh9\.julia\packages\MbedTLS\mkHpa\deps\build.log`
  Building IJulia ─→ `C:\Users\xh9\.julia\packages\IJulia\0cLgR\deps\build.log`
┌ Error: Error building `IJulia`, showing the last 100 of log:
│ doesn't recognize. It may have been created by another package manager.
│
│
│ ClobberError: The package 'defaults::notebook-5.7.0-py36_0' cannot be installed due to a
│ path collision for 'lib/site-packages/notebook/tree/tests/__pycache__/test_tree_handler.cpython-36.pyc'.
│ This path already exists in the target prefix, and it won't be removed
│ by an uninstall action in this transaction. The path is one that conda
│ doesn't recognize. It may have been created by another package manager.
│
│
│ ClobberError: The package 'defaults::notebook-5.7.0-py36_0' cannot be installed due to a
│ path collision for 'lib/site-packages/notebook/tree/tests/test_tree_handler.py'.
│ This path already exists in the target prefix, and it won't be removed
│ by an uninstall action in this transaction. The path is one that conda
│ doesn't recognize. It may have been created by another package manager.
│
│
│ ClobberError: The package 'defaults::notebook-5.7.0-py36_0' cannot be installed due to a
│ path collision for 'lib/site-packages/notebook/utils.py'.
│ This path already exists in the target prefix, and it won't be removed
│ by an uninstall action in this transaction. The path is one that conda
│ doesn't recognize. It may have been created by another package manager.
│
│
│ ClobberError: The package 'defaults::notebook-5.7.0-py36_0' cannot be installed due to a
│ path collision for 'lib/site-packages/notebook/view/__init__.py'.
│ This path already exists in the target prefix, and it won't be removed
│ by an uninstall action in this transaction. The path is one that conda
│ doesn't recognize. It may have been created by another package manager.
│
│
│ ClobberError: The package 'defaults::notebook-5.7.0-py36_0' cannot be installed due to a
│ path collision for 'lib/site-packages/notebook/view/__pycache__/__init__.cpython-36.pyc'.
│ This path already exists in the target prefix, and it won't be removed
│ by an uninstall action in this transaction. The path is one that conda
│ doesn't recognize. It may have been created by another package manager.
│
│
│ ClobberError: The package 'defaults::notebook-5.7.0-py36_0' cannot be installed due to a
│ path collision for 'lib/site-packages/notebook/view/__pycache__/handlers.cpython-36.pyc'.
│ This path already exists in the target prefix, and it won't be removed
│ by an uninstall action in this transaction. The path is one that conda
│ doesn't recognize. It may have been created by another package manager.
│
│
│ ClobberError: The package 'defaults::notebook-5.7.0-py36_0' cannot be installed due to a
│ path collision for 'lib/site-packages/notebook/view/handlers.py'.
│ This path already exists in the target prefix, and it won't be removed
│ by an uninstall action in this transaction. The path is one that conda
│ doesn't recognize. It may have been created by another package manager.
│
│
│ ClobberError: The package 'defaults::notebook-5.7.0-py36_0' cannot be installed due to a
│ path collision for 'scripts/jupyter-bundlerextension.exe'.
│ This path already exists in the target prefix, and it won't be removed
│ by an uninstall action in this transaction. The path is one that conda
│ doesn't recognize. It may have been created by another package manager.
│
│
│ ClobberError: The package 'defaults::notebook-5.7.0-py36_0' cannot be installed due to a
│ path collision for 'scripts/jupyter-nbextension.exe'.
│ This path already exists in the target prefix, and it won't be removed
│ by an uninstall action in this transaction. The path is one that conda
│ doesn't recognize. It may have been created by another package manager.
│
│
│ ClobberError: The package 'defaults::notebook-5.7.0-py36_0' cannot be installed due to a
│ path collision for 'scripts/jupyter-notebook.exe'.
│ This path already exists in the target prefix, and it won't be removed
│ by an uninstall action in this transaction. The path is one that conda
│ doesn't recognize. It may have been created by another package manager.
│
│
│ ClobberError: The package 'defaults::notebook-5.7.0-py36_0' cannot be installed due to a
│ path collision for 'scripts/jupyter-serverextension.exe'.
│ This path already exists in the target prefix, and it won't be removed
│ by an uninstall action in this transaction. The path is one that conda
│ doesn't recognize. It may have been created by another package manager.
│
│
│
│
│ [ Info: Installing Jupyter via the Conda package.
│ [ Info: Running `conda install -y jupyter` in root environment
│ ERROR: LoadError: failed process: Process(setenv(`'C:\Users\xh9\.julia\conda\3\Scripts\conda.exe' install -y jupyter`,["USERDOMAIN_ROAMINGPROFILE=AD", "HOMEPATH=\\Users\\xh9", "ProgramData=C:\\ProgramData", "ProgramW6432=C:\\Program Files", "PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC", "SESSIONNAME=Console", "APPDATA=C:\\Users\\xh9\\AppData\\Roaming", "PUBLIC=C:\\Users\\Public", "USERDOMAIN=AD", "OS=Windows_NT", "PROCESSOR_REVISION=8e09", "TMP=C:\\Users\\xh9\\AppData\\Local\\Temp", "ALLUSERSPROFILE=C:\\ProgramData", "Path=C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program Files\\MATLAB\\R2018a\\bin;C:\\Program Files\\MATLAB\\R2017b\\runtime\\win64;C:\\Program Files\\MATLAB\\R2017b\\bin;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\Program Files\\Intel\\WiFi\\bin\\;C:\\Program Files\\Common Files\\Intel\\WirelessCommon\\;C:\\Users\\xh9\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\xh9\\AppData\\Local\\Programs\\MiKTeX 2.9\\miktex\\bin\\x64\\;C:\\Users\\xh9\\AppData\\Local\\GitHubDesktop\\bin", "COMPUTERNAME=XHUOLT", "USERNAME=xh9", "CommonProgramFiles(x86)=C:\\Program Files (x86)\\Common Files", "CommonProgramFiles=C:\\Program Files\\Common Files", "CONDARC=C:\\Users\\xh9\\.julia\\conda\\3\\condarc-julia.yml", "USERPROFILE=C:\\Users\\xh9", "LDMS_LOCAL_DIR=C:\\Program Files (x86)\\LANDesk\\LDClient\\Data", "PSModulePath=C:\\Program Files\\WindowsPowerShell\\Modules;C:\\WINDOWS\\system32\\WindowsPowerShell\\v1.0\\Modules", "PROCESSOR_LEVEL=6", "USERDNSDOMAIN=AD.GATECH.EDU", "=C:=C:\\Users\\xh9\\.julia\\packages\\IJulia\\0cLgR\\deps", "TEMP=C:\\Users\\xh9\\AppData\\Local\\Temp", "SystemDrive=C:", "HOMEDRIVE=C:", "PYTHONIOENCODING=UTF-8", "LOCALAPPDATA=C:\\Users\\xh9\\AppData\\Local", "PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 142 Stepping 9, GenuineIntel", "DriverData=C:\\Windows\\System32\\Drivers\\DriverData", "NUMBER_OF_PROCESSORS=4", "=::=::\\", "ComSpec=C:\\WINDOWS\\system32\\cmd.exe", "SystemRoot=C:\\WINDOWS", "OneDrive=C:\\Users\\xh9\\OneDrive", "UATDATA=C:\\windows\\CCM\\UATData\\D9F8C395-CAB8-491d-B8AC-179A1FE1BE77", "ProgramFiles(x86)=C:\\Program Files (x86)", "LOGONSERVER=\\\\GTAD02", "CONDA_PREFIX=C:\\Users\\xh9\\.julia\\conda\\3", "windir=C:\\WINDOWS", "FPS_BROWSER_USER_PROFILE_STRING=Default", "JULIA_LOAD_PATH=@;C:\\Users\\xh9\\AppData\\Local\\Temp\\jl_76C3.tmp", "CommonProgramW6432=C:\\Program Files\\Common Files", "ProgramFiles=C:\\Program Files", "FPS_BROWSER_APP_PROFILE_STRING=Internet Explorer", "PROCESSOR_ARCHITECTURE=AMD64", "OPENBLAS_MAIN_FREE=1"]), ProcessExited(1)) [1]
│ Stacktrace:
│  [1] error(::String, ::Base.Process, ::String, ::Int64, ::String) at .\error.jl:42
│  [2] pipeline_error at .\process.jl:705 [inlined]
│  [3] #run#504(::Bool, ::Function, ::Cmd) at .\process.jl:663
│  [4] run at .\process.jl:661 [inlined]
│  [5] macro expansion at .\logging.jl:307 [inlined]
│  [6] runconda(::Cmd, ::String) at C:\Users\xh9\.julia\packages\Conda\uQitS\src\Conda.jl:112
│  [7] add at C:\Users\xh9\.julia\packages\Conda\uQitS\src\Conda.jl:181 [inlined] (repeats 2 times)
│  [8] top-level scope at logging.jl:311
│  [9] top-level scope at C:\Users\xh9\.julia\packages\IJulia\0cLgR\deps\build.jl:38
│  [10] include at .\boot.jl:317 [inlined]
│  [11] include_relative(::Module, ::String) at .\loading.jl:1041
│  [12] include(::Module, ::String) at .\sysimg.jl:29
│  [13] include(::String) at .\client.jl:388
│  [14] top-level scope at none:0
│ in expression starting at C:\Users\xh9\.julia\packages\IJulia\0cLgR\deps\build.jl:9
│
│ Full log at C:\Users\xh9\.julia\packages\IJulia\0cLgR\deps\build.log
└ @ Pkg.Operations C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.0\Pkg\src\Operations.jl:1069
stevengj commented 5 years ago

It looks like you have may an earlier broken installation that is confusing the Anaconda installer. Try deleting the old installation:

rm(raw"C:\Users\xh9\.julia\conda", recursive=true)

and trying Pkg.build("IJulia") again.

jlumpe commented 5 years ago

Had a similar problem building IJulia when moving to a different Julia installation. Removing ~/.julia/conda/ fixed it.

stevengj commented 5 years ago

Closing — if you can find a way to reproduce this reliably, please file a Conda.jl issue.