我刚刚在Windows中安装了julia v1.0,并添加了PyPlot,然后尝试使用。 没有成功
julia> using PyPlot
[ Info: Precompiling PyPlot [d330b81b-6aea-500a-939a-2ce795aea3ee]
WARNING: could not import Base.mimewritable into PyPlot
ERROR: LoadError: UndefVarError: start not defined
Stacktrace:
[1] getproperty(::Module, ::Symbol) at .\sysimg.jl:13
[2] top-level scope at none:0
[3] include at .\boot.jl:317 [inlined]
[4] include_relative(::Module, ::String) at .\loading.jl:1038
[5] include(::Module, ::String) at .\sysimg.jl:29
[6] top-level scope at none:2
[7] eval at .\boot.jl:319 [inlined]
[8] eval(::Expr) at .\client.jl:389
[9] top-level scope at .\none:3
in expression starting at C:\Users\Lucas\.julia\packages\LaTeXStrings\qycAf\src\LaTeXStrings.jl:62
ERROR: LoadError: Failed to precompile LaTeXStrings [b964fa9f-0449-5b57-a5c2-d3ea65f4040f] to C:\Users\Lucas\.julia\compiled\v1.0\LaTeXStrings\H4HGh.ji.
Stacktrace:
[1] error(::String) at .\error.jl:33
[2] macro expansion at .\logging.jl:313 [inlined]
[3] compilecache(::Base.PkgId, ::String) at .\loading.jl:1184
[4] _require(::Base.PkgId) at .\logging.jl:311
[5] require(::Base.PkgId) at .\loading.jl:852
[6] macro expansion at .\logging.jl:311 [inlined]
[7] require(::Module, ::Symbol) at .\loading.jl:834
[8] include at .\boot.jl:317 [inlined]
[9] include_relative(::Module, ::String) at .\loading.jl:1038
[10] include(::Module, ::String) at .\sysimg.jl:29
[11] top-level scope at none:2
[12] eval at .\boot.jl:319 [inlined]
[13] eval(::Expr) at .\client.jl:389
[14] top-level scope at .\none:3
in expression starting at C:\Users\Lucas\.julia\packages\PyPlot\jXCXB\src\PyPlot.jl:295
ERROR: Failed to precompile PyPlot [d330b81b-6aea-500a-939a-2ce795aea3ee] to C:\Users\Lucas\.julia\compiled\v1.0\PyPlot\oatAj.ji.
Stacktrace:
[1] error(::String) at .\error.jl:33
[2] macro expansion at .\logging.jl:313 [inlined]
[3] compilecache(::Base.PkgId, ::String) at .\loading.jl:1184
[4] macro expansion at .\logging.jl:311 [inlined]
[5] _require(::Base.PkgId) at .\loading.jl:941
[6] require(::Base.PkgId) at .\loading.jl:852
[7] macro expansion at .\logging.jl:311 [inlined]
[8] require(::Module, ::Symbol) at .\loading.jl:834
我必须安装Python或其他外部文件或程序吗? 情节也行不通!
答案 0 :(得分:1)
由于Julia v1.0是全新的,因此某些软件包尚不兼容。尽管已经进行了必要的更改,但是还没有被标记(发布),这很常见。要获取软件包的最新版本,可以执行add Packagename#master
。如果是PyPlot,则需要LaTeXStrings的主版本,它是PyPlot的依赖项。以下应该起作用:
(v1.0) pkg> add LaTeXStrings#master
(v1.0) pkg> add PyPlot