julia - Julia 1.0.0:尝试添加 PyPlot 包时出错
问题描述
不确定如何响应尝试添加 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!
解决方案
请参阅https://discourse.julialang.org/t/package-compatibility-caps/15301。
最有可能的问题是您安装了Benchmark
未维护的软件包。
通过以下方式卸载软件包Benchmark
:(v1.0) pkg> rm Benchmark
在尝试安装PyPlot
.
推荐阅读
- regex - Visual Studio Code:正则表达式以开头但不以结尾
- qt - 如何强制 Qt 更新/修复隐藏的 QWidget 以进行视频捕获?
- kotlin - 应将 Lambda 参数移出括号
- android - RecyclerView last Item 没有完整显示item,因为上面的TabLayout
- android - 从Activity中获取fragment的TextView数据
- javascript - Sidebar DOM 与 Navbar 重叠,将其从 DOM 中移除
- javascript - Chrome 扩展程序:创建了多个页面
- node.js - 我想使用 Pond.js 但不知道如何要求它
- matlab - Matlab中矩阵中每10个数字的平均值
- exe - 在用 launch4j 包装的 Firefox 上阻止 .exe 下载