Julia 1.0.0 : Error trying to add PyPlot package

标签 julia

不确定如何响应尝试添加 PyPlot 时出现的以下错误消息:

julia> # Fresh 1.0.0 REPL

julia> versioninfo()
Julia Version 1.0.0
Commit 5d4eaca0c9 (2018-08-08 20:58 UTC)
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: Intel(R) Core(TM) i7-4700MQ CPU @ 2.40GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-6.0.0 (ORCJIT, haswell)

(v1.0) pkg> add PyPlot
  Updating registry at `C:\Users\Jim\.julia\registries\General`
  Updating git-repo `https://github.com/JuliaRegistries/General.git`
 Resolving package versions...
ERROR: Unsatisfiable requirements detected for package Benchmark [de6e09b3]:
 Benchmark [de6e09b3] log:
 ├─possible versions are: [0.0.1-0.0.3, 0.1.0] or uninstalled
 ├─restricted to versions * by an explicit requirement, leaving only versions [0.0.1-0.0.3, 0.1.0]
 └─restricted by julia compatibility requirements to versions: uninstalled — no versions left

有什么建议吗?

编辑

根据 Bogumił Kamiński 非常有帮助的答案,我执行了以下操作,并且在重新启动 REPL 后它起作用了。这是基于响应错误消息的简短摘要:

(v1.0) pkg> rm Benchmark

(v1.0) pkg> add PyPlot

(v1.0) pkg> build PyCall

# Restart REPL
julia> using PyPlot

julia> plot([1, 2, 3, 4, 5], [3, 5, 10, 4, 2])
1-element Array{PyCall.PyObject,1}:
 PyObject <matplotlib.lines.Line2D object at 0x0000000034CDEE48>

julia> # It works!

PyPlot Image

最佳答案

参见https://discourse.julialang.org/t/package-compatibility-caps/15301 .

最有可能的问题是您安装了未维护的包 Benchmark

在尝试安装 PyPlot 之前,通过以下方式卸载软件包 Benchmark:(v1.0) pkg> rm Benchmark

关于 Julia 1.0.0 : Error trying to add PyPlot package,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52485573/

相关文章:

julia - 如何在 Julia 中读取(二进制)文件的最后 x 个字节?

dataframe - 获取子集化后剩余的数据帧

c - Julia:调用 GSL 函数

julia - 在 Julia 中使用 include 和全局变量

python - 重用最后一行 Jupyter 的结果

io - 元图加载和保存

file - 如何在 julia 中编辑一行文件?

file-io - 如何在Julia中逐行读取文件?

dataframe - 在同一列中分配过滤值的结果不正确

julia -//运算符在 Julia 中是什么意思?