Skip to content

Error when calling Julia function defined in module #27

Closed
@arbenede

Description

@arbenede

I am trying to call a Julia function defined in a module (say MyModule, defined in MyModule.jl) in a Python script. I did something along the lines of

from juliacall import Main as jl

jl.seval('push!(LOAD_PATH, "<path to MyModule.jl>")')
jl.seval("using MyModule")

ret = jl.MyModule.some_function(arg1,arg2,arg3)

however I am getting an error:

juliacall.Error: ArgumentError: Package MyModule not found in current path:
- Run `import Pkg; Pkg.add("MyModule")` to install the MyModule package.

What am I doing wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions