【问题标题】:How use julia package "Mathematica"?如何使用 julia 包“Mathematica”?
【发布时间】:2020-01-28 20:09:42
【问题描述】:

我将 Mathematica 包 (https://github.com/JuliaInterop/Mathematica.jl) 添加到 julia 1.3.1。

现在如果我使用命令...

using Mathematica

我收到此错误:

[ Info: Precompiling Mathematica [32681abc-2ee8-5d23-a06a-fe3af83833d6]
┌ Warning: Package Mathematica does not have MathLink in its dependencies:
│ - If you have Mathematica checked out for development and have
│   added MathLink as a dependency but haven't updated your primary
│   environment's manifest file, try `Pkg.resolve()`.
│ - Otherwise you may need to report an issue with Mathematica
└ Loading MathLink into Mathematica from project dependency, future warnings for Mathematica are suppressed.
ERROR: LoadError: LoadError: UndefVarError: @mmimport not defined
Stacktrace:
 [1] top-level scope
 [2] eval at ./boot.jl:330 [inlined]
 [3] top-level scope at /Users/murray/.julia/packages/Mathematica/W4UIg/src/Mathematica.jl:36
 [4] include at ./boot.jl:328 [inlined]
 [5] include_relative(::Module, ::String) at ./loading.jl:1105
 [6] include(::Module, ::String) at ./Base.jl:31
 [7] top-level scope at none:2
 [8] eval at ./boot.jl:330 [inlined]
 [9] eval(::Expr) at ./client.jl:425
 [10] top-level scope at ./none:3
in expression starting at /Users/murray/.julia/packages/Mathematica/W4UIg/src/Mathematica.jl:36
in expression starting at /Users/murray/.julia/packages/Mathematica/W4UIg/src/Mathematica.jl:34
ERROR: Failed to precompile Mathematica [32681abc-2ee8-5d23-a06a-fe3af83833d6] to /Users/murray/.julia/compiled/v1.3/Mathematica/cqgUM_XJ2Lx.ji.
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1283
 [3] _require(::Base.PkgId) at ./loading.jl:1024
 [4] require(::Base.PkgId) at ./loading.jl:922
 [5] require(::Module, ::Symbol) at ./loading.jl:917

我该如何纠正这个问题?

【问题讨论】:

  • 包超级旧,至少3年无人维护。我怀疑您是否可以在不彻底检查代码的情况下使其工作。
  • 您可能对SymPy.jl 包感兴趣,它在符号计算领域提供了许多类似的功能,并且有据可查。
  • 对于 Mathematica,请改用 MathLink.jl

标签: julia


【解决方案1】:

根据 Chris 的评论,建议使用 MathLink.jl。我与 Mathematica 的包维护者交谈,并在自述文件中添加了弃用警告以避免将来出现问题。

【讨论】:

    猜你喜欢
    • 2020-10-07
    • 2018-04-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-04-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多