Reputation: 2155
Started separated topic with clean new install as suggested by Håkon Hægland.
For those who are interested in solution, skip to end.
Gnuplot failing to install. Problem described here
Now removed all perl and started from clean install.
Using strawberry perl pdl edition, from zip package strawberry-perl-5.32.1.1-64bit-PDL, no msi.
First according to Documentation for PDL First Steps.
I ran cpan PDL::Graphics::Simple
.
Looks like successful.
Now run perldl according to Documentation for PDL First Steps
pdl> use PDL::Graphics::Simple
PDL::Graphics::Simple::register: PDL::Graphics::Simple::Prima is out of date - winging it at perlhome/perl/site/lib/PDL/Graphics/Simple.pm line 1397, <DATA> line 209.
pdl>imag (sin(rvals(200,200)+1))
Trying gnuplot (PDL::Graphics::Gnuplot)...nope
Trying pgplot (PDL::Graphics::PGPLOT::Window)...nope
Trying plplot (PDL::Graphics::PLplot)...nope
Trying prima (PDL::Graphics::Prima)...nope
Sorry, all known plotting engines failed. Install one and try again.
So, first warning went not according to Documentation for PDL First Steps. The further errors after calling imag (sin(rvals(200,200)+1))
went also not according to documentation. Test any plot
pdl> use PDL::Graphics::Gnuplot;
Can't locate PDL/Graphics/Gnuplot.pm in @INC (you may need to install the PDL::Graphics::Gnuplot module) (@INC contains: perlhome/perl/site/lib perlhome/perl/vendor/lib perlhome/perl/lib) at (eval 61) line 4, <DATA> line 209.
BEGIN failed--compilation aborted at (eval 61) line 4, <DATA> line 209.
Already knowing in advance is no plot installed, proceeding to install gnuplot, first one on the list.
cpan PDL::Graphics::Gnuplot
Upvotes: 1
Views: 254
Reputation: 2155
I would suggest to skip directly to UPDATE 1, and if doesn't work try from the beginning.
Following suggestion from @Ed, I separated the answer from the question.
As a long try&fail. With assistance from @HåkonHægland.
Note: The documentation for PDL specifies only the step N4 from enumerated here. Everything else is not part of documentation. This discrepancy is not something that is actually expected (!!). When starting perldl I see such a remark:
On a software that pretends to be scientific, this looks rather like an excuse why pdl does not work, and documentation is inconsistent.
##########################################
First solution which worked, but on a clean new Windows 11 laptop did not work, so I don't expect it to work on other clean platform either.
The steps to perform:
cpan PDL::Graphics::Simple
in command line.cpan PDL::Graphics::Gnuplot
in command line.Note, steps 5 and 6 shown some lwp failures while downloading, but not really critical. The lwp was failing one source, then downloading from alternative resource.
##########################################
Update 1: On a clean new system, Windows 11, but I expect will work for any other system. The steps to perform are similar to above ones, with small difference, add to the path variable the c++ compiler the which comes with the perl package, also step 4, unpacking the gnuplot, must be done at the very end, not before deploying packages from steps 5, 6:
The above steps did not work, so do not follow them. Maybe is even better to do the following steps, on a separated system, so you will create a perl+pdl+gnuplot portable, ready to run from a stick or an external drive, or copy and run where it is needed.
set path=%path%;perlhome\perl\bin
if is not added to system.set path=%path%;perlhome\c\bin
. Note, using any other external tool may lead, and will lead to abberations during install.cpan PDL::Graphics::Simple
in command line.cpan PDL::Graphics::Gnuplot
in command line. So far installation executed successfully, but PDL Graphics still will not work.Trying to use cpan to install PDL::Graphics::PGPLOT::Window fails. I must emphasize, I installed gnuplot under Julia and that works exactly as is specified in the documentation, is self sufficient, has no interference with system no matter what. Nothing required to dig in, guess, investigate, documentation is high quality, and so is the support.
Upvotes: 2