SymPy does not precompile in v1.2?

I am trying to use SymPy to do some symbolic manipulation in Julia. A simple code like

using SymPy

@vars x

f(x) = e^x

results in an error when precompiling:

[ Info: Precompiling SymPy [24249f21-da20-56a4-8eb1-6a02cf4ae2e6]
ERROR: LoadError: InitError: /Users/mrohde/.julia/packages/SpecialFunctions/fvheQ/deps/usr/lib/libopenspecfun.1.3.dylib cannot be opened, Please re-run Pkg.build("fvheQ"), and restart Julia.
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] check_deps() at /Users/mrohde/.julia/packages/SpecialFunctions/fvheQ/deps/deps.jl:20
 [3] __init__() at /Users/mrohde/.julia/packages/SpecialFunctions/fvheQ/src/SpecialFunctions.jl:12
 [4] _include_from_serialized(::String, ::Array{Any,1}) at ./loading.jl:685
 [5] _require_search_from_serialized(::Base.PkgId, ::String) at ./loading.jl:765
 [6] _require(::Base.PkgId) at ./loading.jl:990
 [7] require(::Base.PkgId) at ./loading.jl:911
 [8] require(::Module, ::Symbol) at ./loading.jl:906
 [9] include at ./boot.jl:328 [inlined]
 [10] include_relative(::Module, ::String) at ./loading.jl:1094
 [11] include(::Module, ::String) at ./Base.jl:31
 [12] top-level scope at none:2
 [13] eval at ./boot.jl:330 [inlined]
 [14] eval(::Expr) at ./client.jl:432
 [15] top-level scope at ./none:3
during initialization of module SpecialFunctions
in expression starting at /Users/mrohde/.julia/packages/SymPy/wd4d9/src/SymPy.jl:35
ERROR: LoadError: Failed to precompile SymPy [24249f21-da20-56a4-8eb1-6a02cf4ae2e6] to /Users/mrohde/.julia/compiled/v1.2/SymPy/KzewI.ji.
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1253
 [3] _require(::Base.PkgId) at ./loading.jl:1013
 [4] require(::Base.PkgId) at ./loading.jl:911
 [5] require(::Module, ::Symbol) at ./loading.jl:906
 [6] include_string(::Module, ::String, ::String) at ./loading.jl:1064
 [7] (::getfield(Main._vscodeserver, Symbol("##9#12")){String,Int64,Int64,String})() at /Users/mrohde/.vscode-insiders/extensions/julialang.language-julia-0.12.2/scripts/terminalserver/terminalserver.jl:153
 [8] withpath(::getfield(Main._vscodeserver, Symbol("##9#12")){String,Int64,Int64,String}, ::String) at /Users/mrohde/.vscode-insiders/extensions/julialang.language-julia-0.12.2/scripts/terminalserver/repl.jl:62
 [9] (::getfield(Main._vscodeserver, Symbol("##8#11")){String,Int64,Int64,String})() at /Users/mrohde/.vscode-insiders/extensions/julialang.language-julia-0.12.2/scripts/terminalserver/terminalserver.jl:152
 [10] hideprompt(::getfield(Main._vscodeserver, Symbol("##8#11")){String,Int64,Int64,String}) at /Users/mrohde/.vscode-insiders/extensions/julialang.language-julia-0.12.2/scripts/terminalserver/repl.jl:28
 [11] macro expansion at /Users/mrohde/.vscode-insiders/extensions/julialang.language-julia-0.12.2/scripts/terminalserver/terminalserver.jl:148 [inlined]
 [12] (::getfield(Main._vscodeserver, Symbol("##7#10")))() at ./task.jl:268
in expression starting at /Users/mrohde/Downloads/test.jl:1

When doing

Pkg.build("fvheQ")

as provided in the error message I get the message that fvheQ does not exist as package.

Could somebody help? Thanks!

I also find that using SymPy by itself fails in the REPL using Julia 1.2, but the error is due to the SpecialFunctions module, not SymPy.

Doing Pkg.build("SpecialFunctions") made the error go away for me. I suspect that there was/is a problem in its build script that broke upgrades.

1 Like

That did the job. Thanks Steven! :+1: