This is my first time using Julia. I installed the latest Julia version from official sources to my Windows 10 machine.
What I’m trying to do is use a custom Julia package in my Python (using Anaconda3) program. PyJulia seems to be setup correctly, I can call Julia from Python and I can also import a Julia package like Lazy.jl to Python. So the basics seem to be setup correctly.
The problem is when trying to use a specific package, which refuses to work. When I try using the package in Julia i get:
julia> using Relief
[ Info: Precompiling Relief [e59a39ae-ffc4-11ea-35a5-2b2996f35250]
ERROR: LoadError: LoadError: cannot replace module Relief during compilation
Stacktrace:
[1] include(mod::Module, _path::String)
@ Base .\Base.jl:386
[2] include(x::String)
@ Relief C:\Users\jagod\.julia\packages\Relief\Q2VqW\src\Relief.jl:1
[3] top-level scope
@ C:\Users\jagod\.julia\packages\Relief\Q2VqW\src\Relief.jl:29
[4] include
@ .\Base.jl:386 [inlined]
[5] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::Nothing)
@ Base .\loading.jl:1213
[6] top-level scope
@ none:1
[7] eval
@ .\boot.jl:360 [inlined]
[8] eval(x::Expr)
@ Base.MainInclude .\client.jl:446
[9] top-level scope
@ none:1
in expression starting at C:\Users\jagod\.julia\packages\Relief\Q2VqW\src\relief.jl:1
in expression starting at C:\Users\jagod\.julia\packages\Relief\Q2VqW\src\Relief.jl:1
ERROR: Failed to precompile Relief [e59a39ae-ffc4-11ea-35a5-2b2996f35250] to C:\Users\jagod\.julia\compiled\v1.6\Relief\jl_35D7.tmp.
Stacktrace:
[1] error(s::String)
@ Base .\error.jl:33
[2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::Base.TTY, internal_stdout::Base.TTY)
@ Base .\loading.jl:1360
[3] compilecache(pkg::Base.PkgId, path::String)
@ Base .\loading.jl:1306
[4] _require(pkg::Base.PkgId)
@ Base .\loading.jl:1021
[5] require(uuidkey::Base.PkgId)
@ Base .\loading.jl:914
[6] require(into::Module, mod::Symbol)
@ Base .\loading.jl:901
Also when trying to use this package from Python, I get a long list of “WARNING: replacing module Relief.” together with the output/error message:
WARNING: replacing module Relief.
Traceback (most recent call last):
File "D:/PyCharm PROJECTS/test_skrelief/relief", line 9, in <module>
from skrelief import swrfstar
File "d:\pycharm projects\test_skrelief\src\skrelief\skrelief\swrfstar.py", line 7, in <module>
from julia import Relief as Relief_jl
File "C:\Users\jagod\Anaconda3\lib\site-packages\julia\core.py", line 260, in load_module
raise ImportError("{} not found".format(juliapath))
ImportError: Relief not found
WARNING: replacing module Relief.
WARNING: replacing module Relief.
WARNING: replacing module Relief.
WARNING: replacing module Relief.
WARNING: replacing module Relief.
WARNING: replacing module Relief.
... etc.
As I said PyCall is compatible with my Python executable, and I tried multiple versions of Julia - all giving the same error.
What could be the cause of this? I searched for an answer/solution for 2 days now, but no luck. Can you help me understand what could be preventing this package from working?