I can't start a Jupyter notebook from the Julia terminal

jupyter

#1

All I get is the following message ->
Process(setenv(jupyter notebook --NotebookApp.iopub_data_rate_limit=2147483647; dir="/home/jean-victor"), ProcessExited(1))


#2

I had the same result this morning on Debian:

julia
               _
   _       _ _(_)_     |  A fresh approach to technical computing
  (_)     | (_) (_)    |  Documentation: https://docs.julialang.org
   _ _   _| |_  __ _   |  Type "?help" for help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.6.3-pre.0 (2017-12-18 07:11 UTC)
 _/ |\__'_|_|_|\__'_|  |  Commit 93168a6826* (92 days old release-0.6)
|__/                   |  x86_64-linux-gnu

julia> using IJulia

julia> notebook()
Process(setenv(`jupyter notebook --NotebookApp.iopub_data_rate_limit=2147483647`; dir="/home/js"), ProcessExited(1))

julia> using Traceur

julia> @trace notebook()
ERROR: UndefVarError: Linux not defined
Stacktrace:
 [1] _step_expr(::ASTInterpreter2.JuliaStackFrame, ::ASTInterpreter2.JuliaProgramCounter) at /home/js/.julia/v0.6/ASTInterpreter2/src/interpret.jl:85
 [2] next_until!(::ASTInterpreter2.##7#8, ::ASTInterpreter2.JuliaStackFrame, ::ASTInterpreter2.JuliaProgramCounter) at /home/js/.julia/v0.6/ASTInterpreter2/src/interpret.jl:144
 [3] execute_command(::DebuggerFramework.DebuggerState, ::ASTInterpreter2.JuliaStackFrame, ::Val{:nc}, ::String) at /home/js/.julia/v0.6/ASTInterpreter2/src/commands.jl:47
 [4] runall(::Traceur.Trace, ::DebuggerFramework.DebuggerState) at /home/js/.julia/v0.6/Vinyl/src/interpret.jl:44
 [5] overdub(::Traceur.Trace, ::Function, ::Symbol, ::Vararg{Any,N} where N) at /home/js/.julia/v0.6/Vinyl/src/interpret.jl:53
 [6] macro expansion at /home/js/.julia/v0.6/Traceur/src/trace.jl:18 [inlined]
 [7] primitive(::Traceur.Trace, ::Function, ::Symbol, ::Vararg{Any,N} where N) at /home/js/.julia/v0.6/Vinyl/src/hooks.jl:24
 [8] runall(::Traceur.Trace, ::DebuggerFramework.DebuggerState) at /home/js/.julia/v0.6/Vinyl/src/interpret.jl:37
 [9] overdub(::Traceur.Trace, ::Function, ::Symbol, ::Vararg{Symbol,N} where N) at /home/js/.julia/v0.6/Vinyl/src/interpret.jl:53
 [10] macro expansion at /home/js/.julia/v0.6/Traceur/src/trace.jl:18 [inlined]
 [11] primitive(::Traceur.Trace, ::Function, ::Symbol, ::Vararg{Symbol,N} where N) at /home/js/.julia/v0.6/Vinyl/src/hooks.jl:24
 [12] runall(::Traceur.Trace, ::DebuggerFramework.DebuggerState) at /home/js/.julia/v0.6/Vinyl/src/interpret.jl:37
 [13] overdub(::Traceur.Trace, ::Function) at /home/js/.julia/v0.6/Vinyl/src/interpret.jl:53
 [14] macro expansion at /home/js/.julia/v0.6/Traceur/src/trace.jl:18 [inlined]
 [15] primitive(::Traceur.Trace, ::Function) at /home/js/.julia/v0.6/Vinyl/src/hooks.jl:24
 [16] runall(::Traceur.Trace, ::DebuggerFramework.DebuggerState) at /home/js/.julia/v0.6/Vinyl/src/interpret.jl:37
 [17] overdub(::Traceur.Trace, ::Function, ::String, ::Vararg{Any,N} where N) at /home/js/.julia/v0.6/Vinyl/src/interpret.jl:53
 [18] macro expansion at /home/js/.julia/v0.6/Traceur/src/trace.jl:18 [inlined]
 [19] primitive(::Traceur.Trace, ::Function, ::String, ::Vararg{Any,N} where N) at /home/js/.julia/v0.6/Vinyl/src/hooks.jl:24
 [20] runall(::Traceur.Trace, ::DebuggerFramework.DebuggerState) at /home/js/.julia/v0.6/Vinyl/src/interpret.jl:37
 [21] overdub(::Traceur.Trace, ::Function) at /home/js/.julia/v0.6/Vinyl/src/interpret.jl:53
 [22] macro expansion at /home/js/.julia/v0.6/Traceur/src/trace.jl:18 [inlined]
 [23] primitive(::Traceur.Trace, ::Function) at /home/js/.julia/v0.6/Vinyl/src/hooks.jl:24
 [24] runall(::Traceur.Trace, ::DebuggerFramework.DebuggerState) at /home/js/.julia/v0.6/Vinyl/src/interpret.jl:37
 [25] overdub(::Traceur.Trace, ::Function) at /home/js/.julia/v0.6/Vinyl/src/interpret.jl:53
 [26] warntrace(::Function) at /home/js/.julia/v0.6/Traceur/src/trace.jl:36

And the same problem from the python side:

jupyter-notebook
Traceback (most recent call last):
  File "/usr/bin/jupyter-notebook", line 11, in <module>
    load_entry_point('notebook==5.4.0', 'console_scripts', 'jupyter-notebook')()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 587, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2800, in load_entry_point
    return ep.load()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2431, in load
    return self.resolve()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2437, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/lib/python3/dist-packages/notebook/notebookapp.py", line 45, in <module>
    ioloop.install()
  File "/usr/lib/python3/dist-packages/zmq/eventloop/ioloop.py", line 210, in install
    assert (not ioloop.IOLoop.initialized()) or \
AttributeError: type object 'IOLoop' has no attribute 'initialized'

#3

Does Pkg.build("IJulia") give an error?


#4

Yes:

julia> Pkg.build("IJulia")
INFO: Building Conda
INFO: Building MbedTLS
INFO: Building ZMQ
INFO: Building IJulia
INFO: Found Jupyter version 4.4.0: jupyter
INFO: Installing Julia kernelspec julia-0.6
Error executing Jupyter command 'kernelspec': [Errno 2] No such file or directory
=======================================================================[ ERROR: IJulia ]=======================================================================

LoadError: could not spawn `jupyter-kernelspec install --replace --user /tmp/julia-0.6`: no such file or directory (ENOENT)
while loading /home/js/.julia/v0.6/IJulia/deps/build.jl, in expression starting on line 104

===============================================================================================================================================================

=======================================================================[ BUILD ERRORS ]========================================================================

WARNING: IJulia had build errors.

 - packages with build errors remain installed in /home/js/.julia/v0.6
 - build the package(s) and all dependencies with `Pkg.build("IJulia")`
 - build a single package by running its `deps/build.jl` script

===============================================================================================================================================================


#5

You have a broken Jupyter installation if jupyter kernelspec doesn’t work.

Either fix your Jupyter installation or tell IJulia to install its own with

ENV["JUPYTER"]=""
Pkg.build("IJulia")

#6

Thanks. That solved the problem. I recently installed a jupyter-notebook package and everything worked well until today. I have removed that package now and will only use IJulia in future for notebooks.