JuliaPy / JuliaPy/pyjulia

Using JuliaPy/PyJulia to interconnect with MATLAB

Open
#453 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
893
Forks
101
PR merge metrics
No merged PRs in 30d

Description

Hi all. I appreciate the efforts to improve Python<-> Julia interconnection.
I am using `Julia 1.6.1` and `Python 3.8.8` (not anaconda installation) on Windows. The interconnection is working very well.
I am able to call both core Julia and my own `Julia ` functions within the Python terminal. Up to this point, everything is fine.

However, I am also trying to interconnect `Julia --> MATLAB` by means of Python because of the lack of a mature `Matlab<->Julia` interface, yet. This is working only if I use Julia's core functions inside my own function as following
```
function makeupper_byjulia(str_in) # placed in a file "juliaFunctionLib.jl"
return uppercase(str_in)
end
```
within `Python ` terminal I use the above `Julia ` function by first importing the Python function below from "juliaLibInterface.py"
```
def makeupper(word): # placed in a file "juliaLibInterface.py"
import julia
from julia import Main
Main.include("juliaFunctionLib.jl")
return Main.makeupper_byjulia(word)
```
MATLAB returns expected output in prompt when I type
py.juliaLibInterface.makeupper('somestring')

When I call a `Julia `function which also includes other functions from `Julia Modules` such as `DataFrames, JuMP`, etc. `MATLAB` raises an error message as
```
Error using py.juliaLibInterface.function_xyz
Cannot find class 'py.PyCall.jlwrap'.
```

How can I resolve this issue?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.