quinnj / Sublime-IJulia

An IJulia Frontend for Sublime Text 3
90 stars 16 forks source link

Can't find libzmq #16

Closed drewgendreau closed 10 years ago

drewgendreau commented 10 years ago

Hi,

I'm having trouble getting IJulia to run in Sublime 3. I'm on Linux (Ubuntu 13.10).

I have IJulia running just fine and ZMQ seems to be installed just fine as well. However, I can't seem to find libzmq:

"~/.julia/ZMQ/deps/usr/lib/libzmq.so"

Within "~/.julia/ZMQ/deps/" there is no "/usr" folder. In fact, within /deps there are just two files, "build.jl" and "deps.jl"

When I run Julia, enter using ZMQ, and type "ZMQ.zmq" I get: "libzmq"

But still can't find it... and I'm guessing why it's not working in Sublime.

I'm using a nightly build of Julia, 0.3.0-prerelease+1127.

Let me know if I can provide any additional information. Look forward to getting Julia working in Sublime at some point!

Thanks, Andrew

quinnj commented 10 years ago

Hey Andrew, sorry for the hassle. We're still figuring out all the idiosyncracies of linux with this. If you open up your Sublime-IJulia settings file (see the homepage for how to get to this) and set your zmq_shared_library value to libzmq.so does that work? The issue seems to be that you had ZMQ installed on your system before installing it through julia (probably by apt-get) so it assumes it's in your path instead of in the regular location julia installs it to. If the above suggestion doesn't work, I'd try grepping in your terminal to find the physical location of the shared library (grep libzmq.so) and put that in your settings file directly.

drewgendreau commented 10 years ago

Hi,

Changing the value to libzmq.so didn't work unfortunately. When I search for libzmq, there are two instances:

/usr/lib/x86_64-linux-gnu/libzmq.so.3 /usr/lib/x86_64-linux-gnu/libzmq.so.3.0.0

Adding either of those to the zmq_shared_library value didn't work. I also tried removing libzmq3 through apt-get and removing/adding ZMQ through Julia using Pkg.rm("ZMQ"), Pkg.add("ZMQ"). That added libzmq.so to ~/.julia/ZMQ/deps/usr/lib/, but removing libzmq3 from linux breaks ipython, so that didn't end up working either.

Let me know if you have any thoughts -- happy to try anything out.

Andrew

quinnj commented 10 years ago

Hey Andrew,

Hmmmm.......are you using the full path name + extension (i.e. path/to/zmq/libzmq.so.3) in the zmq_shared_library value? That has seemed to solve the problem for everyone else.

The next thing to try is to open up sublime, and open up an IJulia console with ctrl+shift+p, type "Open IJulia", and let me know what happens. Also bring up the sublime console ctrl+~ and copy and paste the output here. There should be a line somewhere that says "Command Executed: julia /home/usr/.julia/IJulia/kernel.jl ..." and I would try copy and pasting that command into the terminal to run to see what happens.

drewgendreau commented 10 years ago

We're in business!

I'm not sure why it wasn't working before (maybe I had the wrong path?). In any event, here is my final (working) zmq_shared_library:

"zmq_shared_library": { "linux": "/usr/lib/x86_64-linux-gnu/libzmq.so.3", ... }

Thanks again for all the help!

Andrew

quinnj commented 10 years ago

Yeah, I think sometimes things get cached weird in Sublime, so sometimes a restart is all that's needed to get everything loaded correctly. I'll add some documentation to the install insturctions.