PythonAnywhere Forums

Julia language support.

Hello everyone!

I'd like to know whats the plan for Julia support?

I see we have, julia installed at /usr/bin/julia, but it segfaults.

07:36 ~ $ julia
ERROR: fatal error: unexpected error while retrieving exepath
Segmentation fault
07:36 ~ $ julia -v
julia version 0.5.0
07:36 ~ $ which julia
/usr/bin/julia
07:36 ~ $

If I download the generic binary and untar it get the same result:

07:42 ~ $ wget https://julialang-s3.julialang.org/bin/linux/x64/0.5/julia-0.5.2-linux-x86_64.tar.gz
--2017-06-15 07:42:40--  https://julialang-s3.julialang.org/bin/linux/x64/0.5/julia-0.5.2-linux-x86_64.tar.gz
Resolving julialang-s3.julialang.org (julialang-s3.julialang.org)... 151.101.54.49
Connecting to julialang-s3.julialang.org (julialang-s3.julialang.org)|151.101.54.49|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 62945228 (60M) [application/x-tar]
Saving to: julia-0.5.2-linux-x86_64.tar.gz.1

100%[======================================================================================================================>] 62,945,228  17.1MB/s   in 4.8s

2017-06-15 07:42:46 (12.5 MB/s) - ‘julia-0.5.2-linux-x86_64.tar.gz.1’ saved [62945228/62945228]

07:42 ~ $ tar -xzf julia-0.5.2-linux-x86_64.tar.gz
07:43 ~ $ julia-f4c6c9d4bb/bin/julia
ERROR: fatal error: unexpected error while retrieving exepath
Segmentation fault
07:43 ~ $

A couple of year ago I started a related post when working for MexLavu company:

This time around I tried to build Julia again, but I got out of space quickly with a hacker account.

I'd love to help in any way I can to achieve this feature!

Cheers.

Thanks for the link to the other thread, that was useful -- I would have spent quite a while debugging otherwise:-)

It looks like you need to have Docker-based consoles enabled in order to get Julia working. Shall I switch that on for you? A couple of caveats:

  • Docker consoles slower to load than normal ones (that's why it's not the default).
  • Julia still won't work from scheduled tasks or from web app code.

Thank you very much Giles, Glenn and Harry!

Somehow I messed the answer to the other thread from back then. I would like to try the docker consoles, please.

Can I still revert back? I'd like to try to test using the julia generic bynaries and a schedule job that calls julia, all in a tmux session, to run some julia scripts periodically.

  • https://github.com/dbader/schedule

yes you can switch back, but just to re-iterate -- you won't be able to schedule any jobs that use julia, because we don't have docker for scheduled tasks. let me know if you still want to give it a go, for interactive console use only?

Dear Harry,

Yes, please switch me to the docker consoles. I'd love to test them and report any feedback I find.

Thank you very much in advance, cheers!

OK -- that's done! Do let us know how you get on, or if you need us to switch you back.

Thank you very much. Julia does indeed work with the docker consoles!

PythonAnywhere team, I've shared a console with Giles, Glenn and Harry.

I've been able to set up pip schedule tasks that call julia, which will be useful for my usecase:

julia_schedule_job.png

I want to test having Julia work with schedule on some data this way, and then having Django just load the data and display it, etc.

The idea is that given enough recourses in the PA account, one could run intensive computations with Julia and let Python do the presentation. But I also want to try a Julia web framework called Genie, it had a talk on the recen JuliaCon 2017, and I'm testing deploy options.

Julia has amazing interop with Python!

Good to know! We'll still need to restart console servers every so often, so this won't be the perfect solution in terms of reliablity -- you'll need to restart that tmux session now and again.

We are working on some infrastructure changes that would let you have an "always-on" task which would run julia. Keep an eye out for updates...

Thank you very much, I'll keep both eyes checking out updates!

I know PythonAnywhre is Python focused, so I thank you all for your effort. Julia is becoming an alternative to using C, Fortran, Cython, PyPy, Numba, etc. at least for me. And since I can interoperate from C, Python and Julia I can just ccall whatever is in C or Fortran (or more precisely any shared library abiding to the C ABI) that already exists without glue code, ie:

julia> t = ccall((:clock, "libc"), Int32, ())
2292761
  • https://docs.julialang.org/en/stable/manual/calling-c-and-fortran-code

Django for the web app itself of course and Julia to run simulations and pass data back to Python for plotting, etc.

Julia is becoming more popular among HPC users, scientists mainly for it's performance, but Julia has many nice features (my favourite is metaprogramming) and there even have been many Julia talks in PyCons and Python talks! <3

Cheers :D