我想在我的 Haskell 程序中做一些绘图,但是当我尝试安装绘图时出现以下错误。
Preprocessing library plot-0.2.3.4...
lib/Graphics/Rendering/Plot/Figure/Simple.hs:37:8:
Could not find module ‘Numeric.Container’
Use -v to see a list of the files searched for.
lib/Graphics/Rendering/Plot/Types.hs:25:8:
Could not find module ‘Data.Packed.Vector’
Use -v to see a list of the files searched for.
lib/Graphics/Rendering/Plot/Types.hs:26:8:
Could not find module ‘Data.Packed.Matrix’
Use -v to see a list of the files searched for.
cabal: Error: some packages failed to install:
plot-0.2.3.4 failed during the building phase. The exception was:
ExitFailure 1
已关注 this issue我将 hmatrix 更新到版本 0.17.0.1
但仍然遇到相同的错误。有什么想法吗?
最佳答案
您是使用 cabal
管理该项目,还是只是安装到全局包空间中?
我会转而使用cabal
或stack
来管理依赖项。
FWIW 我已经验证 plot-0.2.3.4
将使用堆栈解析器 lts-3.7
与 hmatrix-0.16.1.5
进行编译,所以我不不认为这是 hmatrix
的问题。
如果您正在使用 cabal,请发布您的 cabal 文件,我们可以找出如何使其工作。否则,我建议创建一个堆栈项目,例如。
- 运行
堆栈新项目名称
- 编辑
project-name.cabal
并将plot
添加到build-depends:
字段 - 运行
堆栈构建
关于haskell - 无法成功安装plot Haskell,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33374575/