安装Perl和PDL

问题描述:

我目前正在尝试 - 安装perl PDL失败,因为我想自动执行一些数据分析和图形生成。安装Perl和PDL

不幸的是,我似乎甚至无法安装必要的模块,没有问题,更不用说创建一个小脚本来处理我的数据文件。

我对Perl有一些粗浅的体验,但没有什么特别的,我正在使用Windows 10 x64。

最初,我参加了x64草莓perl v5.24安装,然后按照此处的指示http://pdl.perl.org/?page=install安装了Astro :: FITS :: Header,Convert :: UU,OpenGL和PDL的ppm安装。但是,在安装Inline :: C时遇到了问题,在尝试PDL_Book_Latest http://sourceforge.net/projects/pdl/files/PDL/2.4.10/PDL-Book-20120205.pdf/download第5页上列出的示例之后,没有任何图像出现,也没有任何图像文件位于我想要搜索的位置。回到谷歌,仍然没有找到任何关于这个问题来源的信息,所以我决定回到原点,并使用旧版本,希望它能更好地记录下来。

因此,通过Windows安装的程序对话框,草莓文件夹和包含“草莓”的注册表项删除草莓perl卸载。然后,使用Padre IDE v5.14进行全新的perl安装 - 可能会有一些调试功能帮助查明错误。开始安装相同的模块(Astro :: FITS :: Header,Convert :: UU,OpenGL,PGPLOT)。 Astro和Convert工作得很好,但是OpenGL开始抛出关于ExtUtils :: F77的错误,我在搜索几个小时后显然错过了它。我去安装这个模块,它不断给出'gfortan'是一个未知命令的错误......我的理解是PDL的想法是避免使用fortran和C,并且我发现旁边没有关于这个安装问题的信息至今。

所以我决定尝试一种替代方法。我从cpan安装ppm模块,并通过ppm命令重复初始安装过程。这次我得到:

“在SOFTPKG内找到未知元素PROVIDE”,位于C:/Dwimperl/perl/site/lib/PPM.pm line 1462.“

所以我的问题是:

我失去了在安装过程中的一些关键步骤?我的系统是否真的把这个问题搞得很糟糕,如果有的话,是否有任何可能的解决方法?事实是,我尝试了两种不同的版本,可能会造成可能成为此问题根源的路径问题?

任何人都可以提供一个替代的,最好不是太复杂的路线来安装在Windows 10上给定的Perl安装PDL?

EDIT 1:

这里是我被试图安装内嵌:: C,表观先决条件PDL

code deleted to make space for updates...

EDIT 3的错误的代码:

我在PATH指定的目录中重新安装了GnuWin32,而不是改变PATH,然后再次尝试安装。 Inline :: C给出了相同的'diff'和'rm'错误。所以我跑了“cpanm --notest'package'”来安装Inline :: C然后PDL,都说他们成功了。但是,即使使用'--notest'cpanm也不能安装OpenGL和PGPLOT。

最后OBJECTIF是能够生产使用fonctions从PGPLOT图形:比如

# use PDL; 
# use PDL::Graphics::PGPLOT; 
# imag(sin(rvals(200,200)+1)); 

但如果PGPLOT不能安装,这并不当然的工作。

编辑4:

在SourceForge https://sourceforge.net/p/pogl/bugs/26/试图通过@ Dr.Avalange找到了修复,发现我似乎有此文件的多个副本。

Here

这是正常的...?

编辑5: 因此,我卸载了Perl,删除了我可以在%APPDATA%,%USERPROFILE%和C:/ DWIM中找到的任何延迟文件,然后运行ccleaner以防万一我遗漏了任何东西。

然后我下载了Windows的Strawberry perl 5.24.1 x64并安装它。

之后,我运行'cpanm Astro :: FITS :: Header',cpanm'Convert-UU'和'cpanm OpenGL'按照http://pdl.perl.org/?page=install。这一切都很好。然后我运行安装了Inline,Pegex,Win32 :: Mutex和Module :: Compile依赖项的'cpanm PDL'。但是,如果与之前提到的Inline :: C具有相同的错误。

我之前已经安装了GetGnuWin32,所以不知道为什么这不起作用。 Windows'Path'环境(不是PATH - 根据先进的系统对话不存在)被标记为

%USERPROFILE%\ AppData \ Local \ Microsoft \ WindowsApps; 在这个目录中,我有GetGnuWin32文件夹,它应该已经安装了您提供的链接中的所有软件包,除非我错过了正确安装的补充步骤?所以我重新下载了DiffUtils设置并运行它,安装到\ programfiles(x86)(默认选项)。然后我重新'cpanm PDL'。

我仍然得到相同的'差异'错误消息。那么DiffUtils是不是正确安装? (我没有关闭并重新打开尝试间和安装后的命令行)编辑6

因此,与--notest安装PDL和PGPLOT后,我试着运行下面的测试,它失败了。见下面

C:\Windows\system32>perldl 
perlDL shell v1.357 
PDL comes with ABSOLUTELY NO WARRANTY. For details, see the file 
'COPYING' in the PDL distribution. This is free software and you 
are welcome to redistribute it under certain conditions, see 
the same file for details. 
ReadLines, NiceSlice, MultiLines enabled 
Reading PDL/default.pdl... 
Found docs database C:/Strawberry/perl/site/lib/PDL/pdldoc.db 
Type 'help' for online help 
Type 'demo' for online demos 
Loaded PDL v2.017 (supports bad values) 

Note: AutoLoader not enabled ('use PDL::AutoLoader' recommended) 

                                 pdl> use PDL::Graphics//PLplot 
Unknown regexp modifier "/P" at (eval 62) line 4, at end of line 
Unknown regexp modifier "/L" at (eval 62) line 4, at end of line 
Unknown regexp modifier "/t" at (eval 62) line 4, at end of line 
BEGIN not safe after errors--compilation aborted at (eval 62) line 5, <DATA> line 207. 

                                 pdl> use PDL::Graphics::PLplot 
Can't locate PDL/Graphics/PLplot.pm in @INC (you may need to install the PDL::Graphics::PLplot module) (@INC contains: C:/Strawberry/perl/site/lib/MSWin32-x64-multi-thread C:/Strawberry/perl/site/lib C:/Strawberry/perl/vendor/lib C:/Strawberry/perl/lib .) at (eval 72) line 5. 
BEGIN failed--compilation aborted 

                                 pdl> use PDL 

                                 pdl> use lib 'C:/Strawberry/perl/site/lib/PDL/Graphics' 

                                 pdl> use PGPLOT 

                                 pdl> use PDL::Graphics::PGPLOT 

                                 pdl> imag(sin(rvals(200,200)+1)) 
Undefined subroutine &PDL::Graphics::PGPLOT::pgqinf called at C:/Strawberry/perl/site/lib/PDL/Graphics/PGPLOT.pm line 408, <DATA> line 90. 

                                 pdl> exit 

C:\Windows\system32>cpanm PDL::Graphics::PGPLOT::pgqinf 
! Finding PDL::Graphics::PGPLOT::pgqinf on cpanmetadb failed. 
! Finding PDL::Graphics::PGPLOT::pgqinf() on mirror http://www.cpan.org failed. 
! Couldn't find module or a distribution PDL::Graphics::PGPLOT::pgqinf 

C:\Windows\system32>cpan PDL::Graphics::PGPLOT::pgqinf 
Loading internal null logger. Install Log::Log4perl for logging messages 
CPAN: CPAN::SQLite loaded ok (v0.211) 
Database was generated on Thu, 13 Apr 2017 13:49:14 GMT 


C:\Windows\system32> 

已经有一个目录的问题,但我设法它指向我曾想过个正确的方向。还尝试安装PLplot'cpanm'表示安装成功,但没有.pm文件,只有另一个目录中有一个.pd,所以使用PDL :: Graphics :: PLplot失败,因为没有找到.pm文件。

编辑:7 那么重试ppm install http://www.sisyphusion.tk/ppm/PGPLOT.ppd似乎为链接的诠释,他的解释提供您在使用 http://www.kalinabears.com.au/w32perl/pgplot-5.2.2-mingw32.tar.bz2 http://jrfonseca.home.dyndns.org/projects/gnu-win32/software/ported/patches/pgplot-5.2.2-mingw32.diff.gz ,不再上班这段时间,而这似乎工作,有没有那名文件的痕迹根据安装需要列出,除非它们只是针对这种特定的方法?

pgplot/bin/cpgplot.dll 
pgplot/bin/pgplot.dll 
pgplot/bin/grfont.dat 
pgplot/include/cpgplot.h 
pgplot/lib/cpgplot.a 
pgplot/lib/pgplot.a 

最后,再次尝试该示例给出以下;没有错误,但没有图像要么...

Microsoft Windows [version 10.0.14393] 
(c) 2016 Microsoft Corporation. Tous droits réservés. 

C:\Windows\system32>perldl 
perlDL shell v1.357 
PDL comes with ABSOLUTELY NO WARRANTY. For details, see the file 
'COPYING' in the PDL distribution. This is free software and you 
are welcome to redistribute it under certain conditions, see 
the same file for details. 
ReadLines, NiceSlice, MultiLines enabled 
Reading PDL/default.pdl... 
Found docs database C:/Strawberry/perl/site/lib/PDL/pdldoc.db 
Type 'help' for online help 
Type 'demo' for online demos 
Loaded PDL v2.017 (supports bad values) 

Note: AutoLoader not enabled ('use PDL::AutoLoader' recommended) 

pdl> use PDL 

pdl> use PDL::Graphics::PGPLOT 

pdl> imag(rvals(200,200)+1) 
%PGPLOT, Unable to read font file: grfont.dat 
%PGPLOT, Use environment variable PGPLOT_FONT to specify the location of the PGPLOT grfont.dat file. 
Displaying 200 x 200 image from 1 to 142.421356201172, using 240 colors (16-255)... 

pdl> $ENV{PGPLOT_FONT} = "C:/Strawberry/perl/site/lib/PGPLOT/pgplot_supp" 

pdl> imag(rvals(200,200)+1) 
Displaying 200 x 200 image from 1 to 142.421356201172, using 240 colors (16-255)... 

pdl> 
+0

“但是,安装Inline :: C有问题”有什么问题?显示发生了什么 –

+0

@ Dr.Avalanche它一直在给dmake一个255错误,其中一个测试参见编辑。 – NzFrancis

从法语翻译后,我可以看到你没有在您的系统diff。安装diff(gnu32的一部分:http://gnuwin32.sourceforge.net/)或者跳过测试。另请参见:

https://github.com/ingydotnet/inline-c-pm/issues/60

草莓5.24.1只需键入从命令提示符下:

cpanm --notest PDL 

,或者如果你想看的一切,是怎么回事:

cpanm -v --notest PDL 

这需要一段时间才能运行。

+0

因此我下载了GetGnuWin32-0.6.3并将其安装到C:/ GnuWin23。 Reran cpan -f Inline :: C和仍然得到相同的'diff'和'rm'未知命令错误。是否有我应该选择的具体安装位置,或者是否需要不定义PATH变量? – NzFrancis

+0

此外,PGPLOT和OpenGL也失败了,有可能是我的安装有问题吗?我从来没有正确安装模块之前有这么多的麻烦.... – NzFrancis

+0

@NzFrancis嗨,你需要添加这些程序被安装到Windows PATH环境变量的路径(看这里:https:// www。 java.com/en/download/help/path.xml)。如果您使用UI执行此操作,则需要关闭并在更改生效之前启动新的命令提示符。请注意''cpanm'比'cpan'快得多,同时请注意我建议用'--notest'尝试。这些模块非常复杂,并且依赖于第三方工具。我只能回答特定问题 –