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

Pyjulia not working on Julia 1.6 #437

Open
lvzhibai opened this issue Apr 5, 2021 · 11 comments
Open

Pyjulia not working on Julia 1.6 #437

lvzhibai opened this issue Apr 5, 2021 · 11 comments

Comments

@lvzhibai
Copy link

lvzhibai commented Apr 5, 2021

When I try to install and work with Python3.9.3 with Julia 1.6, the command

julia.install()

works well, but later

from julia import Base # or Pkg, Main ..etc

leads to segmentation fail, and python exits without other error messages inside terminal.

Then I reinstalled julia 1.5, all commands works well.

System: MacOS Big Sur with Command Line Tools

@emanuellima1
Copy link

I tried with Python 3.8.6 and Julia 1.6 on Kubuntu 20.10 and everything worked fine. I did:

import julia
julia.install()
jl = julia.Julia(compiled_modules=False)
from julia import Base
Base.sind(90)

On the Python REPL.

@ampbj
Copy link

ampbj commented Apr 7, 2021

I have the same issue:
MacOS Big Sur.
Python 3.8.8 [Clang 10.0.0 ] :: Anaconda, Inc. on darwin
julia version 1.6.0

@JackDunnNZ
Copy link

For reference, there is a similar problem for 1.6 with JuliaCall in R on macOS: JuliaInterop/JuliaCall#164

So it seems to be a bug in Julia, the issue is being tracked here: JuliaLang/julia#40246

@KwatMDPhD
Copy link

Same problem here. I'm currently using 1.5.3 until this problems fixed.

@fchorney
Copy link

I posted this in JuliaLang/julia#40246, but I'm going to post it here as well to get a bit more exposure.


So I've been doing some testing trying to get macOS 11.4, Python 3.9, and Julia 1.6 working with pyjulia 0.5.6, and I think I found a way to get it to work somewhat.

Some notes:

  • I am using the Julia 1.6 macOS binary downloaded from julialang.org which exists in /Applications/Julia-1.6.app.
  • I have symlinked the julia binary to my /usr/local/bin like so ln -s /Applications/Julia-1.6.app/Contents/Resources/julia/bin/julia /usr/local/bin/julia1.6 and then whenever I change my default julia I symlink it again like so: ln -s /usr/local/bin/julia1.6 /usr/local/bin/julia
  • I am doing this in a python 3.9 venv

So my first few observations.

ERROR: could not load library "libjulia.1.dylib"
dlopen(libjulia.1.dylib, 1): image not found
  • libjulia.1.dylib exists in /Applications/Julia-1.6.app/Contents/Resources/julia/lib but it seems to be looking in /Applications/Julia-1.6.app/Contents/Resources/julia/lib/julia instead, so I symlinked libjulia.1.dylib into the lib/julia folder and it stopped segfaulting.
  • This seems weird to me since 1.5 didn't have that file in that folder either, so I'm not sure why it's looking for it there now.
  • Then I saw an error that it wouldn't find libjulia.dylib which I just applied the same symlink fix as above and then I had no issues

So, as far as I can tell, the issue is that jl_ isn't exported anymore and pyjulia just checks for its existence, and also julia is looking for libjulia.1.dylib and libjulia.dylib in the wrong place?

Hoping this info might help in some way!

@ihnorton
Copy link
Member

ihnorton commented Sep 3, 2021

This could be "fixed" for 1.6 by removing the is_windows condition here:

if not is_windows:
yield

(see JuliaLang/julia#40246 (comment))

@dpinol
Copy link

dpinol commented Oct 13, 2021

Hi, I have it working with Julia 1.6, but with 1.7 I get an error due to missing jl_
Should we change the name of the issue? or create a new one?

@KwatMDPhD
Copy link

@dpinol
#451

tkf referenced this issue in tkf/pyjulia Oct 24, 2021
@tkf tkf mentioned this issue Oct 24, 2021
@tkf
Copy link
Member

tkf commented Oct 25, 2021

There's now PyJulia 0.5.7 and PyCall 1.92.5 that solved a couple of recent issues. It includes @ihnorton's suggestion #437 (comment)

@fchorney
Copy link

fchorney commented Oct 25, 2021

There's now PyJulia 0.5.7

It doesn't look like this has been tagged and registered yet?

Edit: Oh wait, this is Python not Julia, it works differently. I was confused haha

JackDunnNZ added a commit to JackDunnNZ/JuliaCall that referenced this issue Oct 26, 2021
@fchorney
Copy link

I finally had a chance to try this out. PyJulia 0.5.7 Works perfect on MacOS with Julia 1.6 now. Thanks so much!

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

9 participants