JuliaPy / PyPlot.jl

Plotting for Julia based on matplotlib.pyplot
https://github.com/JuliaPy/PyPlot.jl
MIT License
478 stars 88 forks source link

Not able to use backend gtk #202

Open ufechner7 opened 8 years ago

ufechner7 commented 8 years ago

I would like to use the backend gtk, because the backend qt conflicts with my QML GUI (see: https://github.com/barche/QML.jl and https://github.com/barche/QML.jl/issues/5 ). But I get the following error:

julia> using PyCall
julia> pyimport("gtk")
ERROR: PyError (:PyImport_ImportModule) <type 'exceptions.ImportError'>
ImportError('No module named gtk',)

 [inlined code] from /home/ufechner/.julia/v0.4/PyCall/src/exception.jl:81
 in pyimport at /home/ufechner/.julia/v0.4/PyCall/src/PyCall.jl:285
julia> 

I tried to install pygtk in different ways. First:

import Conda
push!(Conda.CHANNELS, "https://conda.anaconda.org/jochym")
Conda.add("gtk")

Then I tried:

import Conda
push!(Conda.CHANNELS, "https://conda.anaconda.org/pkgw")
Conda.add("gtk3")

Both approaches did not help. I am using Ubuntu 14.04, 64 bit and Julia 0.42. Any ideas?

stevengj commented 8 years ago

I think you need the gi package for Gtk3 (since for Gtk3 we import gi.repository.Gtk)?