gcalderone/Gnuplot.jl

Windows 10/11 - Not recognizing gnuplot installed on device

oren-weiss opened this issue · 1 comments

Hello,
I'm on Windows 11, Julia version 1.7.2, and I get an error when running the tests after adding the package:

using Gnuplot
println(Gnuplot.gpversion())
ERROR: MethodError: no method matching isless(::String, ::VersionNumber)
Closest candidates are:
  isless(::AbstractString, ::AbstractString) at C:\Users\XXX\.julia\juliaup\julia-1.7.2+0~x64\share\julia\base\strings\basic.jl:344
  isless(::Any, ::Missing) at C:\Users\XXX\.julia\juliaup\julia-1.7.2+0~x64\share\julia\base\missing.jl:88
  isless(::Missing, ::Any) at C:\Users\XXX\.julia\juliaup\julia-1.7.2+0~x64\share\julia\base\missing.jl:87
  ...
Stacktrace:
 [1] <(x::String, y::VersionNumber)
   @ Base .\operators.jl:352
 [2] gpversion()
   @ Gnuplot C:\Users\XXX\.julia\packages\Gnuplot\jJ4hs\src\Gnuplot.jl:1380
 [3] top-level scope
   @ REPL[15]:1
test_terminal()
┌ Warning: Cound not start a gnuplot process with command "gnuplot".  Enabling dry sessions...
└ @ Gnuplot C:\Users\XXX\.julia\packages\Gnuplot\jJ4hs\src\Gnuplot.jl:530

However, I know I have gnuplot installed on my machine and on the path:

 run(`gnuplot --version`)
gnuplot 5.4 patchlevel 3
Process(`gnuplot --version`, ProcessExited(0))

But attempting to read this produces an empty string:

read(`gnuplot --version`,String)
""

I can confirm that, but this seems to be Gnuplot bug. See https://sourceforge.net/p/gnuplot/bugs/2490/. Using Gnuplot 5.4.2 works. And hopefully, future version 5.4.4 will work too.