Closed ahbarnett closed 2 years ago
Hi @ahbarnett,
What worked for me in the past:
] pkg> up
using Colors
using Cairo
using Gtk
using InspectDR
using Plots
NOTE: you must ensure these sub-packages are all "add"ed to your Julia environment - otherwise you won't be able to call using
on them.
Please let me know if this worked.
THanks for the help, but it still failed. I'm new to julia Pkg system so don't know what else to try. An empty grey graphics window comes up and here's the output (also has my output updating Pkgs in case some clues there):
(@v1.5) pkg> up
Updating registry at `~/.julia/registries/General`
Updating git-repo `https://github.com/JuliaRegistries/General.git`
┌ Warning: Some registries failed to update:
│ — /home/alex/.julia/registries/General — failed to fetch from repo
└ @ Pkg.Types /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/Pkg/src/Types.jl:1194
Updating git-repo `https://github.com/mbaz/Gaston.jl.git`
No Changes to `~/.julia/environments/v1.5/Project.toml`
No Changes to `~/.julia/environments/v1.5/Manifest.toml`
(@v1.5) pkg> using Colors
ERROR: Could not determine command
(@v1.5) pkg> add Colors
Resolving package versions...
Updating `~/.julia/environments/v1.5/Project.toml`
[5ae59095] + Colors v0.11.2
No Changes to `~/.julia/environments/v1.5/Manifest.toml`
julia> using Colors
julia> using Cairo
ERROR: ArgumentError: Package Cairo not found in current path:
- Run `import Pkg; Pkg.add("Cairo")` to install the Cairo package.
Stacktrace:
[1] require(::Module, ::Symbol) at ./loading.jl:893
(@v1.5) pkg> add Cairo
Resolving package versions...
Updating `~/.julia/environments/v1.5/Project.toml`
[159f3aea] + Cairo v1.0.2
No Changes to `~/.julia/environments/v1.5/Manifest.toml`
julia> using Cairo
julia> using Gtk
ERROR: ArgumentError: Package Gtk not found in current path:
- Run `import Pkg; Pkg.add("Gtk")` to install the Gtk package.
Stacktrace:
[1] require(::Module, ::Symbol) at ./loading.jl:893
(@v1.5) pkg> add Gtk
Resolving package versions...
Updating `~/.julia/environments/v1.5/Project.toml`
[4c0ca9eb] + Gtk v1.1.3
No Changes to `~/.julia/environments/v1.5/Manifest.toml`
julia> using Gtk
[ Info: Precompiling Gtk [4c0ca9eb-093a-5379-98c5-f87ac0bbbf44]
julia> using InspectDR
[ Info: Precompiling InspectDR [d0351b0e-4b05-5898-87b3-e2a8edfddd1d]
┌ Warning: Pkg.installed() is deprecated
└ @ Pkg /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/Pkg/src/Pkg.jl:554
julia> using Plots
julia> inspectdr()
Plots.InspectDRBackend()
julia> plot(rand(1,3),rand(1,3))
(julia:28648): Gtk-WARNING **: 15:54:32.357: Theme parsing error: gtk-widgets.css:20:33: The style property GtkMenu:horizontal-padding is deprecated and shouldn't be used anymore. It will be removed in a future version
...
[lots of similar, then same errors as reported above]
current system (sorry, should I try on a fresh project?):
(@v1.5) pkg> st
Status `~/.julia/environments/v1.5/Project.toml`
[537997a7] AbstractPlotting v0.9.21
[6e4b80f9] BenchmarkTools v0.5.0
[159f3aea] Cairo v1.0.2
[13f3f980] CairoMakie v0.1.2
[35d6a980] ColorSchemes v3.9.0 `https://github.com/JuliaGraphics/ColorSchemes.jl.git#v3.9.0`
[5ae59095] Colors v0.11.2
[c64915e2] ComplexRegions v0.1.0
[adafc99b] CpuId v0.2.2
[497a8b3b] DoubleFloats v1.0.3
[28b8d3ca] GR v0.46.0
[92c85e6c] GSL v0.6.0
[4b11ee91] Gaston v1.0.4 `https://github.com/mbaz/Gaston.jl.git#master`
[4d00f742] GeometryTypes v0.7.8
[dc211083] Gnuplot v1.0.0
[4c0ca9eb] Gtk v1.1.3
[7073ff75] IJulia v1.21.1
[d0351b0e] InspectDR v0.3.6
[c8ce9da6] IntelVectorMath v0.3.0
[42fd0dbc] IterativeSolvers v0.8.1
[b964fa9f] LaTeXStrings v1.0.3
[ee78f7c6] Makie v0.9.5
[91a5bcdd] Plots v0.29.1
[d330b81b] PyPlot v2.8.2
[1fd47b50] QuadGK v2.3.1
[3cdcf5f2] RecipesBase v0.8.0
[fdea26ae] SIMD v2.8.0
[3e6341c9] SLEEF v0.5.2
[276daf66] SpecialFunctions v0.10.0
[90137ffa] StaticArrays v0.12.1
[fd094767] Suppressor v0.1.1
[3d5dd08c] VectorizationBase v0.5.0
Best, Alex
Interesting. You have old versions of Plots.jl and InspectDR.jl. They are presently at v1.91 & 0.3.9 respectively.
Ok. well, you could start by updating your packages using the package manager:
] up
If that fails (or you just want to start fresh), they yes: go ahead and start a fresh project.
Please be aware that, by default ~/.julia/environments/v1.5/Project.toml
is in your project stack. So even if you create a new environment, the packages "add"ed to this v1.5
project/environment will still be available (though possibly overwritten by newer versions of the packages in your new, active environment).
So it might be best to rename this v1.5
environment directory to something else in order to truly start fresh.
In the past, I have sometimes needed to completely remove the ~/.julia
repository to "start fresh". Note that I haven't needed to do this in a while, though. I think I used to do this when I moved between versions of julia with different "revision" numbers (ex: 0.6.2->0.6.3).
You can also that InspectDR.jl works by itself by running the following:
using InspectDR
pathInspect = dirname(pathof(InspectDR))
include(joinpath(pathInspect, "..", "sample", "runsamples.jl"))
@ma-laforge Please, close this issue.
As of julia 1.7.1 I have tested InspectDR works by itself after installing Colors and NumericIO also by hand. Thanks! Alex
I can't get a hello-world plot working on my Ubuntu 16.04 LTS as follows. Any help appreciated - thanks, Alex
julia> versioninfo() Julia Version 1.5.2 Commit 539f3ce943 (2020-09-23 23:17 UTC) Platform Info: OS: Linux (x86_64-pc-linux-gnu) CPU: Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz WORD_SIZE: 64 LIBM: libopenlibm LLVM: libLLVM-9.0.1 (ORCJIT, skylake) Environment: JULIA_NUM_THREADS = 8
julia> using Plots julia> inspectdr() Plots.InspectDRBackend()
julia> plot(rand(1,3),rand(1,3)) Error showing value of type Plots.Plot{Plots.InspectDRBackend}: ERROR: could not load symbol "jl_function_ptr": /usr/local/julia-1.5.2/bin/../lib/libjulia.so.1: undefined symbol: jl_functionptr Stacktrace: [1] cfunction(::Any, ::Any, ::Any) at /home/alex/.julia/packages/Gtk/X3A4U/src/GLib/GLib.jl:35 [2] cfunction_ at /home/alex/.julia/packages/Gtk/X3A4U/src/GLib/GLib.jl:32 [inlined] [3] signal_connect_generic(::Function, ::Gtk.GtkCanvas, ::String, ::Type{Nothing}, ::Tuple{}, ::Bool, ::Gtk.GtkCanvas) at /home/alex/.julia/packages/Gtk/X3A4U/src/GLib/signals.jl:11 [4] signal_connect at /home/alex/.julia/packages/Gtk/X3A4U/src/GLib/signals.jl:6 [inlined] (repeats 2 times) [5] Gtk.GtkCanvas(::Int64, ::Int64) at /home/alex/.julia/packages/Gtk/X3A4U/src/cairo.jl:20 [6] GtkCanvas at /home/alex/.julia/packages/Gtk/X3A4U/src/cairo.jl:15 [inlined] [7] InspectDR.PlotWidget(::InspectDR.Plot2D) at /home/alex/.julia/packages/InspectDR/nVO9m/src/gtk_top.jl:132 [8] InspectDR.PlotWidget(::InspectDR.GtkPlot, ::InspectDR.Plot2D) at /home/alex/.julia/packages/InspectDR/nVO9m/src/gtk_top.jl:205 [9] sync_subplots(::InspectDR.GtkPlot) at /home/alex/.julia/packages/InspectDR/nVO9m/src/gtk_top.jl:218 [10] InspectDR.GtkPlot(::InspectDR.Multiplot) at /home/alex/.julia/packages/InspectDR/nVO9m/src/gtk_top.jl:275 [11] display at /home/alex/.julia/packages/InspectDR/nVO9m/src/gtk_top.jl:327 [inlined] [12] _display(::Plots.Plot{Plots.InspectDRBackend}) at /home/alex/.julia/packages/Plots/qZHsp/src/backends/inspectdr.jl:469 [13] display(::Plots.PlotsDisplay, ::Plots.Plot{Plots.InspectDRBackend}) at /home/alex/.julia/packages/Plots/qZHsp/src/output.jl:144 [14] display(::Any) at ./multimedia.jl:328 [15] #invokelatest#1 at ./essentials.jl:710 [inlined] [16] invokelatest at ./essentials.jl:709 [inlined] [17] print_response(::IO, ::Any, ::Bool, ::Bool, ::Any) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/REPL/src/REPL.jl:238 [18] print_response(::REPL.AbstractREPL, ::Any, ::Bool, ::Bool) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/REPL/src/REPL.jl:223 [19] (::REPL.var"#do_respond#54"{Bool,Bool,REPL.var"#64#73"{REPL.LineEditREPL,REPL.REPLHistoryProvider},REPL.LineEditREPL,REPL.LineEdit.Prompt})(::Any, ::Any, ::Any) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/REPL/src/REPL.jl:822 [20] #invokelatest#1 at ./essentials.jl:710 [inlined] [21] invokelatest at ./essentials.jl:709 [inlined] [22] run_interface(::REPL.Terminals.TextTerminal, ::REPL.LineEdit.ModalInterface, ::REPL.LineEdit.MIState) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/REPL/src/LineEdit.jl:2355 [23] run_frontend(::REPL.LineEditREPL, ::REPL.REPLBackendRef) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/REPL/src/REPL.jl:1144 [24] (::REPL.var"#38#42"{REPL.LineEditREPL,REPL.REPLBackendRef})() at ./task.jl:356