本文介绍了朱莉娅1.0.0:尝试添加PyPlot包时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

Not sure how to respond to the following error message trying to add 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之后,我执行了以下操作并成功运行.这是一个简短的摘要,基于对错误消息的响应:

Based on Bogumił Kamiński's very helpful answer, I did the following and it worked, after restarting the REPL. This is a short summary, based on responding to error messages:

(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.

Most likely the problem is that you have installed package Benchmark which is not maintained.

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

Uninstall package Benchmark by: (v1.0) pkg> rm Benchmark before trying to install PyPlot.

这篇关于朱莉娅1.0.0:尝试添加PyPlot包时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-26 15:38