Julia 1.0.0:尝试添加PyPlot包时出错
尝试添加PyPlot时,不确定如何响应以下错误消息:Julia 1.0.0:尝试添加PyPlot包时出错,julia,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_SI
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!
(v1.0)pkg>rm基准
(v1.0)打包>添加PyPlot
(v1.0)pkg>buildpycall
#重新启动REPL
julia>使用PyPlot
朱莉娅>情节([1,2,3,4,5],[3,5,10,4,2])
1元素数组{PyCall.PyObject,1}:
PyObject
茱莉亚>#它奏效了!
请参见
最可能的问题是您安装了未维护的包基准测试
在尝试安装PyPlot
之前,卸载程序包Benchmark
的方法是:(v1.0)pkg>rm Benchmark
,这是否意味着我不能同时使用Benchmark和PyPlot?也许我应该和牛虻一起去?朱莉娅是个新手,不知道该用哪种方式来制作图形。有什么建议吗?谢谢你及时的回答!这意味着您不能使用基准测试
包PyPlot
不依赖于它,因此您可以安全地删除它。我建议您使用BenchmarkTools
而不是Benchmark
(我想您最近甚至在StackOverflow上做了一个Q-a条目)。好的,我现在看到Benchmark和BenchmarkTools是两个不同的包。不知何故,在查看错误消息时,我没有意识到这一点(可能很明显)。再次感谢!事实上,BenchmarkTools不久前取代了Benchmark,所以很容易错过它。更新很好:)。谢谢,再次感谢您的帮助。我被难住了。