You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can use Julia call packages of python, for example, @pyimport math
math.sin(math.pi / 4) - sin(pi / 4). However, when @pyimport the module I programmed, I cannot use the function in that module, and the error is UndefVarError. Seems Julia can see the module, but cannot see the function defined in that module.
The text was updated successfully, but these errors were encountered:
I'll take a wild guess that your Python module name is also the name of some other module. If you run names(your_module) after @pyimport, what do you see? Can you import your module in Python?
If that's not it, we'll need more information. Could you shrink down your code to a minimum and post it?
@cstjean yeah, you are right, I changed the module name, and now it works. Thanks! @stevengj Thanks, I have already used unshift!(PyVector(pyimport("sys")["path"]), "") .
I can use Julia call packages of python, for example, @pyimport math
math.sin(math.pi / 4) - sin(pi / 4). However, when @pyimport the module I programmed, I cannot use the function in that module, and the error is UndefVarError. Seems Julia can see the module, but cannot see the function defined in that module.
The text was updated successfully, but these errors were encountered: