Skip to content

Julia 1.0 Error : julia.core.JuliaError: Exception 'UndefVarError' occurred while calling julia code: #196

Closed
@albeiroep

Description

@albeiroep

Hello. I'm trying to use PyJulia with Julia 1.0. I already cloned PyJulia and i configured all the Julia environment (I can execute julia code without problems). But when i try to use pyjulia i get this error :

Traceback (most recent call last):
File "/home/spiritusspei/PycharmProjects/taf_analytics/venv/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 2961, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "", line 1, in
runfile('/home/spiritusspei/PycharmProjects/taf_analytics/tafs/Testing/Testing.py', wdir='/home/spiritusspei/PycharmProjects/taf_analytics/org/imt')
File "/snap/pycharm-professional/83/helpers/pydev/_pydev_bundle/pydev_umd.py", line 197, in runfile
pydev_imports.execfile(filename, global_vars, local_vars) # execute the script
File "/snap/pycharm-professional/83/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "/home/spiritusspei/PycharmProjects/taf_analytics/tafs/Testing/Testing.py", line 13, in
j = julia.Julia(jl_runtime_path="/home/spiritusspei/Programs/julia-1.0.0/bin/julia", debug=True)
I tried too with j = julia.Julia()
File "/home/spiritusspei/PycharmProjects/taf_analytics/venv/lib/python3.6/site-packages/julia/core.py", line 560, in init
self.__julia = Julia(*args, **kwargs)
File "/home/spiritusspei/PycharmProjects/taf_analytics/venv/lib/python3.6/site-packages/julia/core.py", line 443, in init
""lib", "pyjulia%s-v$(VERSION.major).$(VERSION.minor)"))" % sys.version_info[0])
File "/home/spiritusspei/PycharmProjects/taf_analytics/venv/lib/python3.6/site-packages/julia/core.py", line 488, in _call
self.check_exception(src)
File "/home/spiritusspei/PycharmProjects/taf_analytics/venv/lib/python3.6/site-packages/julia/core.py", line 515, in check_exception
.format(exception, src))

julia.core.JuliaError: Exception 'UndefVarError' occurred while calling julia code:
unshift!(Base.LOAD_CACHE_PATH, abspath(Pkg.Dir._pkgroot(),"lib", "pyjulia3-v$(VERSION.major).$(VERSION.minor)"))

I went to the julia console and when i execute Base.LOAD_CACHE_PATH i get the error
ERROR: UndefVarError: LOAD_CACHE_PATH not defined

What can i do in order to use PyJulia from Python? Thank you in advance.

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