Installing packages from inside IJulia or alternatively?

146 views
Skip to first unread message

Willem Hekman

unread,
Aug 8, 2016, 5:26:35 AM8/8/16
to JuliaBox
Hello all,

Me and my colleagues are currently developing a MOOC and plan to have the students work with some relatively simple notebooks via JuliaBox.

Here we'd like to use Gadfly.jl and Convex.jl which require an install.

Given that we want things to run smoothly for the students we would like to make installing these packages as simple as possible for them students.

At first instance we came up with the idea of having the students run a notebook cell containing Pkg.add("X") and Pkg.update().

Here we are aware of the fact that installing packages from inside IJulia may lead to some problems ( https://github.com/JuliaLang/julia/issues/12508 ).

Given the above we wonder, what would you recommend?

To give some more information.

Currently we let the student run Pkg.add("Gadfly")  from within IJulia in a setup.ipynd notebook.
Some warnings aside---

WARNING: Module Compat uuid did not match cache file
  This is likely because module Compat does not support  precompilation but is imported by a module that does.
WARNING: deserialization checks failed while attempting to load cache from /opt/julia_packages/.julia/lib/v0.4/BinDeps.ji
INFO: Package database updated

--- we get to install Gadfly. Then we ask the students to halt this notebook and open the first course material notebook.

In this course material notebook we import PyPlot (using PyPlot) and Gadfly (import Gadfly) upon which we get the warnings:

WARNING: Module JSON uuid did not match cache file This is likely because module JSON does not support precompilation but is imported by a module that does. WARNING: deserialization checks failed while attempting to load cache from /opt/julia_packages/.julia/lib/v0.4/Conda.ji
INFO: Precompiling module Gadfly...
WARNING: could not import LinAlg._chol! into FixedSizeArrays
WARNING: New definition 
    +(AbstractArray{T<:Any, 2}, WoodburyMatrices.SymWoodbury) at /home/juser/.julia/v0.4/WoodburyMatrices/src/SymWoodburyMatrices.jl:106
is ambiguous with: 
    +(DataArrays.DataArray, AbstractArray) at /home/juser/.julia/v0.4/DataArrays/src/operators.jl:276.
To fix, define 
    +(DataArrays.DataArray{T<:Any, 2}, WoodburyMatrices.SymWoodbury)
before the new definition.
WARNING: New definition 
    +(AbstractArray{T<:Any, 2}, WoodburyMatrices.SymWoodbury) at /home/juser/.julia/v0.4/WoodburyMatrices/src/SymWoodburyMatrices.jl:106
is ambiguous with: 
    +(DataArrays.AbstractDataArray, AbstractArray) at /home/juser/.julia/v0.4/DataArrays/src/operators.jl:300.
To fix, define 
    +(DataArrays.AbstractDataArray{T<:Any, 2}, WoodburyMatrices.SymWoodbury)
before the new definition.

Aside from these warnings looking worrysome this approach seems to work.

Still I am very much wondering what you would recommend us.

As an aside, the MOOC will be a TU Delft and Caltech collaboration . I`ll make sure this gets added to the thread on MOOCS using JuliaBox.

- Willem

tanmaykm

unread,
Aug 8, 2016, 9:30:30 AM8/8/16
to JuliaBox
Hello Willeam.

Yes, adding packages from within a notebook is sometimes problematic. The workaround is to do it on the console, probably through a script.
But the default JuliaBox package set will probably get reviewed after the Julia 0.5 release and we may be able to include these if they are working properly with 0.5.

When is the MOOC scheduled for and how many students would participate?

- Tanmay.

Chris Rackauckas

unread,
Aug 8, 2016, 12:51:05 PM8/8/16
to JuliaBox
You should see this discussion: https://github.com/JuliaLang/julialang.github.com/pull/399#issuecomment-238171017

Gadfly hasn't had development and isn't v0.5, at least yet. Whether anyone will be fixing that is unknown. I would recommend using Plots.jl. 

Viral Shah

unread,
Aug 9, 2016, 5:46:30 AM8/9/16
to juli...@googlegroups.com
Gadfly will certainly be updated for 0.5!

But we will be adding more packages for plotting as well. We are focussing on the transition to juliaBox.com first, and then on simplifying package management, as well as general stability and sync issues. That is what we expect the next couple of months to look like.

In 0.3, we used to provide 150 packages, and in 0.4 that became unwieldy. But package management is getting better, precompilation is, and lots of people liked the pre-installed packages. Thus we will probably bring the default bundle back and are also discussing the possibility of allowing people to build their bundles that they can provide for use to others (classes, etc.).


-viral

--
You received this message because you are subscribed to the Google Groups "JuliaBox" group.
To unsubscribe from this group and stop receiving emails from it, send an email to julia-box+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
-viral

Willem Hekman

unread,
Aug 15, 2016, 1:39:52 PM8/15/16
to JuliaBox
Very good to know. Now I`m looking at alternatives for Gadfly. When it comes to this, can you maybe give me a recommendation?

The main reason I picked Gadfly alognside PyPlot in the first place was in order to make the  "Bloch sphere" figures https://en.wikipedia.org/wiki/Bloch_sphere

So it is basically a very minimal 3D polar coordinate plot.

Although PyPlot support 3D plotting I could not immediatly figure out how get this minimal visual style.

Any pointers?

Maybe you can disable the background grid, plot x,y,z axis by hand and annotate the axis labels?


 






On Monday, August 8, 2016 at 6:51:05 PM UTC+2, Chris Rackauckas wrote:
Gadfly hasn't had develoment and isn't v0.5, at least yet. Whether anyone will be fixing that is unknown. I would recommend using Plots.jl. 

bloch_sphere.PNG

Willem Hekman

unread,
Aug 15, 2016, 1:39:52 PM8/15/16
to JuliaBox
I see, now that I learn about Gadfly not having had much development lately I`ll see if I can switch to using PyPlot only.

The MOOC is scheduled to start around 10 October, around 4000 (!) people have signed up.

However  we expect a reasonable amount of people to drop out at the start of the course and some part to install IJulia themselves.

Each week there will be a notebook exercise sheet which will take each student approx. 3 hours to go over. The focus is on a combination of Interact.jl together with the plotting features.

- Willem

Viral Shah

unread,
Aug 15, 2016, 1:41:41 PM8/15/16
to juli...@googlegroups.com
Could you share a URL for the MOOC?

We should have 0.5 released by then, and all the packages caught up - so that you can use Gadfly or PyPlot.

-viral
> --
> You received this message because you are subscribed to the Google Groups "JuliaBox" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to julia-box+...@googlegroups.com.

Willem Hekman

unread,
Sep 1, 2016, 4:54:19 AM9/1/16
to JuliaBox
Hey Viral, my apologies for not having replied earlier.

The URL for the MOOC is: https://www.edx.org/course/quantum-cryptography-caltechx-delftx-qucryptox

We're only using PyPlot atm which seems to be running smooth except for the legend of scatter points not showing up in the legend of matplotlib3d:

Would maybe be something that Steven would know how fix easily.

Would love to get in touch with him, also to provide some nice examples of how to use PyPlot for the documentation, but I`m not sure where to reach him, do you have any idea?

Nishanth Kottary

unread,
Sep 1, 2016, 9:44:37 AM9/1/16
to hekman...@gmail.com, juli...@googlegroups.com
Hi Willem,

Please file this issue here.  The developers of PyPlot.jl may be able to help.  

Regards,
Nishanth

To unsubscribe from this group and stop receiving emails from it, send an email to julia-box+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages