Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to use julia.Main #184

Closed
Hong-Xiang opened this issue Aug 17, 2018 · 2 comments
Closed

Failed to use julia.Main #184

Hong-Xiang opened this issue Aug 17, 2018 · 2 comments

Comments

@Hong-Xiang
Copy link

Julia: 1.0
Installed Conda ────────── v1.0.1
Installed VersionParsing ─ v1.1.2
Installed MacroTools ───── v0.4.4
Installed Compat ───────── v1.0.1
Installed JSON ─────────── v0.19.0
Installed PyCall ───────── v1.18.0

Python: Anaconda 3.6.6
pyjulia: 0.1.5 (via github clone)

both python and julia are in PATH

to reproduce, run

from julia import Main

got

ERROR: UndefVarError: Libdl not defined
Stacktrace:
 [1] top-level scope at none:0
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 656, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 626, in _load_backward_compatible
  File "<HOME>/anaconda3/lib/python3.6/site-packages/julia/core.py", line 164, in load_module
    JuliaMainModule(self, fullname))
  File "<HOME>/anaconda3/lib/python3.6/site-packages/julia/core.py", line 69, in __init__
    self._julia = loader.julia
  File "<HOME>/anaconda3/lib/python3.6/site-packages/julia/core.py", line 156, in julia
    self.__class__.julia = julia = Julia()
  File "<HOME>/anaconda3/lib/python3.6/site-packages/julia/core.py", line 345, in __init__
    JULIA_HOME, libjulia_path, image_file, depsjlexe = juliainfo()
  File "<HOME>/anaconda3/lib/python3.6/site-packages/julia/core.py", line 274, in juliainfo
    """])
  File "<HOME>/anaconda3/lib/python3.6/subprocess.py", line 336, in check_output
    **kwargs).stdout
  File "<HOME>/anaconda3/lib/python3.6/subprocess.py", line 418, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['julia', '-e', '\n         println(VERSION < v"0.7.0-DEV.3073" ? JULIA_HOME : Base.Sys.BINDIR)\n         println(Libdl.dlpath(string("lib", splitext(Base.julia_exename())[1])))\n         println(unsafe_string(Base.JLOptions().image_file))\n         PyCall_depsfile = Pkg.dir("PyCall","deps","deps.jl")\n         if isfile(PyCall_depsfile)\n            eval(Module(:__anon__),\n                Expr(:toplevel,\n                 :(Main.Base.include($PyCall_depsfile)),\n                 :(println(pyprogramname))))\n         end\n         ']' returned non-zero exit status 1.

If I install via pip install julia, I can't import Main, at that case Main is not defined.

@tkf
Copy link
Member

tkf commented Aug 21, 2018

The docs in README is only valid for git master. Also, even git master does not support Julia 1.0 + Conda. See: #185

@tkf
Copy link
Member

tkf commented Nov 8, 2018

PyJulia 0.2 is out now. So I consider this to be resolved.

@tkf tkf closed this as completed Nov 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants