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
Suppose I have a main.py file and I want to call the functions inside this file from Julia. So, if the file is in the same directory, doing @pyimport main gives me an error:
julia> @pyimport hello
ERROR: PyError (ccall(@pysym(:PyImport_ImportModule), PyPtr, (Cstring,), name)) <class 'ModuleNotFoundError'>
ModuleNotFoundError("No module named 'main'",)
Stacktrace:
[1] pyerr_check at /home/ayush99/.julia/v0.6/PyCall/src/exception.jl:56 [inlined]
[2] pyerr_check at /home/ayush99/.julia/v0.6/PyCall/src/exception.jl:61 [inlined]
[3] macro expansion at /home/ayush99/.julia/v0.6/PyCall/src/exception.jl:81 [inlined]
[4] pyimport(::String) at /home/ayush99/.julia/v0.6/PyCall/src/PyCall.jl:374
I tried other options too, but to no avail. How can I import this specific file?
The text was updated successfully, but these errors were encountered:
Suppose I have a
main.py
file and I want to call the functions inside this file from Julia. So, if the file is in the same directory, doing@pyimport main
gives me an error:I tried other options too, but to no avail. How can I import this specific file?
The text was updated successfully, but these errors were encountered: