Plotting in windows?

I’m having not having any luck for the backends in Plots under windows. I’ve tried pyplot, gr and plotlyjs.

i tend to get a lot of

_show is not defined for this backend

Also too, pyplot is giving me a page full of errors on precomplitation.

I just need simply XY plots, could someone recommend a package that is known to be working under windows ?


I’ve seen the same error on my colleague’s computer and the issue seemed that she was not running Julia as administrator. I guess you could try running as admin and then rebuilding the plotting packages.

Is this in Atom or in the REPL? What are the PyPlot errors? The Plots backends should all work under windows.


it is in the julia repl.
I would love to get the error messages, but I can’t seem to copy out of the julia repl.
there’s probably a way to create a transcript ?
i will also try running it as admin.

Never had problems copying from the REPL. There is an issue copying from the Atom console, there you’d have to right-click the output.

yep. when i highlight something and right click, copy is greyed out.
i don’t have access to the machine right now.
i’ll double-check all these things when i get back to it.

ok. so that’s weird. you have to enable “quick edit” mode for the window.
i don’t remember having to ever do that before…

here’s what happens when i try to use the gr backend, via gr()

julia> plot(randn(10))
WARNING: _show is not defined for this backend. m=text/plain

and this is what happens when i try to use pyplot - by the way - i get the impression that python doesn’t actually need to be installed for pyplot backend to work. is that right ?

LoadError: PyCall not properly installed. Please run“PyCall”)

I did that, and it seemed to work, so I tried plotting again:

INFO: Precompiling module PyPlot.
ImportError: No module named site
WARNING: Couldn't initialize pyplot.  (might need to install it?)
INFO: To do a standard install of pyplot, copy and run this:

if !Plots.is_installed("PyPlot")
withenv("PYTHON" => "") do"PyPlot")

ERROR: Failed to precompile PyPlot to C:\Users\user\.julia\lib\v0.5\PyPlot.ji.
 in compilecache(::String) at .\loading.jl:593
 in require(::Symbol) at .\loading.jl:422
 in _initialize_backend(::Plots.PyPlotBackend) at C:\Users\user\.julia\v0.5\Plo
 in backend() at C:\Users\user\.julia\v0.5\Plots\src\backends.jl:182
 in Plots.Plot{T<:Plots.AbstractBackend}() at C:\Users\user\.julia\v0.5\Plots\s
 in #plot#261 at C:\Users\user\.julia\v0.5\Plots\src\plot.jl:50 [inlined]
 in plot(::Array{Float64,1}) at C:\Users\user\.julia\v0.5\Plots\src\plot.jl:46

Did you run this? [20 char]

More than once.

INFO: Building Conda
INFO: Building PyCall
INFO: No system-wide Python was found; got the following error:
could not spawn `'' -c "import distutils.sysconfig; print(
t_config_var('VERSION'))"`: no such file or directory (ENOENT)
using the Python distribution in the Conda package
INFO: Downloading miniconda installer ...


ok. i fired up julia in windows to take another try at this and…both GR and pyplot are working.
i could have sworn that i had restarted julia (more than once) while i was trying to debug this.
apparently i didn’t or it would have worked.
my advice is to make sure and install PyPlot and GR before Plots
That seems to make everything run a bit more smoothly.
oh, and restart julia.

1 Like

Note that you don’t need to do ENV["PYTHON"]="" with PyCall anymore to get it to use it’s own Conda distro (which is more reliable than using whatever python it finds in the path). This is now the default on Mac and Windows.

You might be running into broken install on 32-bit windows? · Issue #65 · JuliaPy/Conda.jl · GitHub, which should be fixed if you do a Pkg.update()

good grief. i’m just not with it today.
ok. GR absolutely works.
however pyplot was still not working.

i did an Pkg.update()

cut/pasted the add/build code that i keep seeing.

I saw a lot of stuff having to do with conda, lots of things were downloaded.


and success…


Thanks very much for all the help.