Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to start IJulia Console: ***Kernel Died*** #60

Open
GregPlowman opened this issue Sep 20, 2014 · 14 comments
Open

Trying to start IJulia Console: ***Kernel Died*** #60

GregPlowman opened this issue Sep 20, 2014 · 14 comments

Comments

@GregPlowman
Copy link

Hi,
I followed the procedure for installing Sublime-IJulia, but ran into the (apparently well-known) _Kernel Died_ problem.

• Windows 8.1 64-bit
• Julia v0.3.0
• Sublime Text Build 3065 (unregistered)

When I select "Sublime-IJulia: Open New IJulia Console” from the command palette, I get the following message in a new document titled “IJulia 1”
_Kernel Died_

In the console, I get:

Starting IJulia backend...
Command Executed: C:/Program Files/Julia-0.3.0/bin/julia.exe C:\Users\Greg/.julia/v0.3/IJulia/src/kernel.jl "C:\Users\Greg\AppData\Roaming\Sublime Text 3\Packages/User/profile-1.json"
Heartbeat didn't get a response
Heartbeat didn't get a response
Heartbeat didn't get a response
Heartbeat didn't get a response
Heartbeat didn't get a response
Kernel died, closing sockets....
Sockets closed...

I edited IJulia.jl, to turn on verbose mode (line 4: verbose = true) and then executed the same command from the windows command prompt:

“C:/Program Files/Julia-0.3.0/bin/julia.exe” C:\Users\Greg/.julia/v0.3/IJulia/src/kernel.jl "C:\Users\Greg\AppData\Roaming\Sublime Text 3\Packages/User/profile-1.json"

I get the following output before returning back to the windows command prompt (presumably the kernel died):

PROFILE = ["key"=>"","transport"=>"tcp","ip"=>"127.0.0.1","hb_port"=>5685,"shell
_port"=>5686,"control_port"=>5684,"stdin_port"=>5683,"iopub_port"=>5687]

If I execute the same command without the second argument (the ".../profile-1.json" argument to kernel.jl):

C:\Users\Greg>"C:/Program Files/Julia-0.3.0/bin/julia.exe" C:\Users\Greg/.julia
/v0.3/IJulia/src/kernel.jl

I get the following output and the command prompt does not return (presumable the kernel is running):

connect ipython with --existing C:\Users\Greg/profile-5192.json
SENDING IPython Msg [ idents status ] {
header = ["msg_id"=>"084e8fbd-2b10-48e3-9db0-5d1a8819d725","msg_type"=>"status
","username"=>"jlkernel","session"=>"????"],
metadata = Dict{String,Any}(),
content = ["execution_state"=>"starting"]
}
Starting kernel event loops.

Can you help me, or shed any light on this issue.
Would really like to get an editor or IDE to work with Julia.
Thanks, Greg

@davidheart
Copy link

I also have some problems. ZMQ version 1.XXX is installed while executing Pkg.add("ZMQ").
I dunno how to upgrade up to 2.0 version as you mentioned as a requirement.

Can you answer me?

Thanks,

@quinnj
Copy link
Owner

quinnj commented Jan 28, 2015

Really sorry to not have responded sooner (grad school.....). Happy to help troubleshoot if needed.

@GregPlowman
Copy link
Author

Yes, I would really like to get this working, but not sure where to start.
Is there anything I can do to diagnose or hone in on the problem?

@shamiltonian
Copy link

Hi, I've been trying to get Sublime working with Julia all day but to no avail. My ZMQ file is correctly located at: /usr/local/lib/libzmq.dylib. Julia is in my path, so that when I type "julia" into the terminal, Julia loads up perfectly. I edited the user settings in Sublime to correctly specify the location of ZMQ as suggested. I also have the latest version of Sublime 3 installed. But when I try to open Julia from within Sublime, I get the "Kernel Died" message within a "* ljulia 1 *" tab. When I run the relevant command:

julia /Users/stevenhamilton/.julia/v0.3/IJulia/src/kernel.jl "/Users/stevenhamilton/Library/Application Support/Sublime Text 3/Packages/User/profile-1.json"

from within the terminal, I get the following output, with no progress:

Brias-MacBook-Air:~ stevenhamilton$ julia /Users/stevenhamilton/.julia/v0.3/IJulia/src/kernel.jl "/Users/stevenhamilton/Library/Application Support/Sublime Text 3/Packages/User/profile-1.json"
Starting kernel event loops.

Any help you could lend would be greatly appreciated.

@quinnj
Copy link
Owner

quinnj commented Feb 4, 2015

Hmmm....interesting. One thing I noticed while going through my own setup
recently on OSX was how fragile all the paths were. I had to explicitly
specify the full absolute paths of pretty much everything to get it to
work. I would try the full absolute path of your julia executable. I'm also
going to look into making all that path handling code a little more
friendly/robust. Let me know if that helps.

On Tue, Feb 3, 2015 at 7:28 PM, shamiltonian [email protected]
wrote:

Hi, I've been trying to get Sublime working with Julia all day but to no
avail. My ZMQ file is correctly located at: /usr/local/lib/libzmq.dylib.
Julia is in my path, so that when I type "julia" into the terminal, Julia
loads up perfectly. I edited the user settings in Sublime to correctly
specify the location of ZMQ as suggested. I also have the latest version of
Sublime 3 installed. But when I try to open Julia from within Sublime, I
get the "Kernel Died" message within a "ljulia 1" tab. When I run the
relevant command:

julia /Users/stevenhamilton/.julia/v0.3/IJulia/src/kernel.jl
"/Users/stevenhamilton/Library/Application Support/Sublime Text
3/Packages/User/profile-1.json"

from within the terminal, I get the following output, with no progress:

Brias-MacBook-Air:~ stevenhamilton$ julia
/Users/stevenhamilton/.julia/v0.3/IJulia/src/kernel.jl
"/Users/stevenhamilton/Library/Application Support/Sublime Text
3/Packages/User/profile-1.json"
Starting kernel event loops.

Any help you could lend would be greatly appreciated.


Reply to this email directly or view it on GitHub
#60 (comment)
.

@shamiltonian
Copy link

Thanks so much for your prompt reply.

I changed "julia" to "/Applications/Julia-0.3.5.app/Contents/Resources/julia/bin/julia" in the sublime user settings page, et voila, the Julia title loads in Sublime.

However, when I go to run a simple script in another tab (with "Julia" displayed in the bottom RHS of the window), I get the following error message:

[Errno 2] No such file or directory: 'julia'
[cmd: ['julia', '/Users/stevenhamilton/Dropbox/...']]
[dir: /Users/stevenhamilton/Dropbox/...]
[path: /usr/bin:/bin:/usr/sbin:/sbin]
[Finished]

My sense is that in the command line there, there should be no inverted commas around "julia", and then no comma before the filename. (Indeed, when I make these changes and post into terminal, it works perfectly). Or am I doing something stupid? Thanks for your continued help!

@GregPlowman
Copy link
Author

Finally, after much playing around, I managed to get Sublime-IJulia working on Windows.

Seems some file paths are processed differently. (Maybe some by Windows directly, others by Julia with some parsing?).

In any case, care needs to be taken with file paths on Windows:

  • absolute or relative
  • quoting entire pathname (especially important if path name has spaces)
  • path separators ( forward or back slash / vs \ )

I played around with many combinations and got really confused.
However I think the Julia executable path should be absolute, quoted (if spaces in path name) and use backslashes.
ZMQ and kernel pathnames can be relative, should be unquoted, and use forward slash separator.

Here's the Windows extract from Sublime user settings file that worked for me:

"windows": {
    "zmq_shared_library": "~/.julia/v0.3/ZMQ/deps/usr/lib/libzmq.dll",      
    "commands": [
        {
            "command_name": "default",
            "julia": "\"C:\\Program Files\\Julia-0.3.5\\bin\\julia.exe\"",
            "julia_args": "",
            "ijulia_kernel": "~/.julia/v0.3/IJulia/src/kernel.jl"
        }
    ]
}

Note that to quote path name use \", and to use backslash path separator use \\.

Cheers, Greg

@sammorris81
Copy link

I was encountering the same build issue mentioned by shamilton on the mac, and was able to fix it by installing Fix Mac Path. Although this addresses the issue for julia-build, you still need to fully specify the path to for the IJulia Console.

@joseraulgonzalez
Copy link

I was able to solve this issue on Mac OS 10.10 by running "which julia" on the terminal and copying the output to the "julia" field under "osx" in my Sublime-Ijulia user configuration file. I hope this helps others.

@rpoddighe
Copy link

I built Julia from source and added a symlink to /usr/local/bin to get Julia in my PATH (first suggestion in README.md). If you do this, make sure you don't point "julia" in the settings to the symlink, but to the executable directly:

"osx": {
    "zmq_shared_library": "~/.julia/v0.3/Homebrew/deps/usr/lib/libzmq.dylib",
    "commands": [
        {
            "command_name": "default",
            "julia": "/path/to/julia_repo/usr/bin/julia",
            "julia_args": "",
            "ijulia_kernel": "~/.julia/v0.3/IJulia/src/kernel.jl"
        }

This worked for me.

@nickleeh
Copy link

@GregPlowman Your solution works! Thank you very much indeed!

@anuraag94
Copy link

I am on mac 10.10, and I have tried all of the suggested advice but I'm still encountering the same error. my file paths are all specified in full:

"osx": {
    "zmq_shared_library": "~/.julia/v0.3/Homebrew/deps/usr/lib/libzmq.dylib",
    "commands": [
        {
            "command_name": "default",
            "Julia" : "/Applications/Julia-0.3.9.app/Contents/Resources/julia/bin/julia",
            "julia_args": "",
            "ijulia_kernel": "~/.julia/v0.3/IJulia/src/kernel.jl"
        }
    ]
},

Would appreciate any advice

@ulzegasi
Copy link

Hi, I am on a MacBook Pro, OSX 10.8.5, and have set all the paths,

"osx": {
    "zmq_shared_library": "~/.julia/v0.3/Homebrew/deps/usr/lib/libzmq.dylib",
    "commands": [
        {
            "command_name": "default",
            "julia": "/Applications/Julia-0.3.9 2.app/Contents/Resources/julia/bin/julia",
            "julia_args": "",
            "ijulia_kernel": "~/.julia/v0.3/IJulia/src/kernel.jl"
        }
    ]
},

but I still get the "Kernel died" message. Any help would be very welcome.

@ForrestGump
Copy link

I have the same problem on WinXP, Sublime 3 (3083), Julia 0.4
My settings:

"windows": {
    "zmq_shared_library": "~/.julia/v0.4/WinRPM/deps/usr/i686-w64-mingw32/sys-root/mingw/bin/libzmq.dll",
    "commands": [
        {
            "command_name": "default",
            "julia": "\"D:\\Program Files\\Julia-0.4.0\\bin\\julia.exe\"",
            "julia_args": "",
            "ijulia_kernel": "~/.julia/v0.4/IJulia/src/kernel.jl"
        }
    ]
}

And I have error:

Starting IJulia backend...
Command Executed: "D:\Program Files\Julia-0.4.0\bin\julia.exe"  C:\Documents and Settings\user/.julia/v0.4/IJulia/src/kernel.jl "D:\Program Files\Sublime Text 3 (3083)\Data\Packages/User/profile-2.json"
Heartbeat didn't get a response
Heartbeat didn't get a response
Heartbeat didn't get a response
Heartbeat didn't get a response
Heartbeat didn't get a response
Kernel died, closing sockets....
Sockets closed...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests