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

no version of Julia is compatible #121

Closed
yakir12 opened this issue Feb 23, 2022 · 7 comments
Closed

no version of Julia is compatible #121

yakir12 opened this issue Feb 23, 2022 · 7 comments

Comments

@yakir12
Copy link

yakir12 commented Feb 23, 2022

I'm trying to use juliacall from python on a Raspberry Pi (32bit). But (not surprisingly) it fails to find a compatible Julia version. I have already the julia binaries (and soft links to them) in /usr/local/bin/julia. Is there a way for me to specify to juliacall the location of said binaries so that it won't attempt to download other binaries?

Error message:

Python 3.7.3 (default, Jan 22 2021, 20:04:44) 
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from juliacall import Main as jl
[juliapkg] Locating Julia ^1.6
[juliapkg] Querying Julia versions from https://julialang-s3.julialang.org/bin/versions.json
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/yakir/.local/lib/python3.7/site-packages/juliacall/__init__.py", line 137, in <module>
    init()
  File "/home/yakir/.local/lib/python3.7/site-packages/juliacall/__init__.py", line 95, in init
    CONFIG['exepath'] = exepath = juliapkg.executable()
  File "/home/yakir/.local/lib/python3.7/site-packages/juliapkg/deps.py", line 274, in executable
    resolve()
  File "/home/yakir/.local/lib/python3.7/site-packages/juliapkg/deps.py", line 228, in resolve
    exe, ver = find_julia(compat=compat, prefix=STATE['install'], install=True, upgrade=True)
  File "/home/yakir/.local/lib/python3.7/site-packages/juliapkg/find_julia.py", line 34, in find_julia
    verstr, _ = best_julia_version(compat)
  File "/home/yakir/.local/lib/python3.7/site-packages/juliapkg/install_julia.py", line 104, in best_julia_version
    raise Exception(f'no version of Julia is compatible with {compat}')
Exception: no version of Julia is compatible with ^1.6
@yakir12
Copy link
Author

yakir12 commented Feb 23, 2022

After reading some more, I thought that all I needed to do was add the path to the executable to the system's PATH, which I tried. But that didn't fix it. When trying to import juliacall it still tried to fetch a compatible julia version instead of using the existing local one.

@cjdoris
Copy link
Collaborator

cjdoris commented Feb 24, 2022

If /usr/local/bin is in your PATH, it should find Julia. What's the output of which julia and julia --version?

The fact it can't find a version of Julia to install is also an issue. Can you open Python and tell me the values of platform.system(), platform.machine() and platform.libc_ver() please?

@cjdoris
Copy link
Collaborator

cjdoris commented Feb 24, 2022

You can't currently specify a particular Julia executable, but I should add an environment variable for this.

@yakir12
Copy link
Author

yakir12 commented Feb 24, 2022

$ echo $PATH
/home/yakir/.local/bin:/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games

$ which julia
/usr/local/bin/julia

$ julia --version
julia version 1.7.2

and

>>> import platform
>>> platform.system()
'Linux'
>>> platform.machine()
'armv7l'
>>> platform.libc_ver()
('glibc', '2.28')

@cjdoris
Copy link
Collaborator

cjdoris commented Feb 24, 2022

OK I've pushed a fix to main. Can you try it out with pip uninstall juliapkg, pip install 'juliapkg @ git+https://github.com/cjdoris/pyjuliapkg' please?

@yakir12
Copy link
Author

yakir12 commented Feb 24, 2022

Gladly, and it worked!

@cjdoris
Copy link
Collaborator

cjdoris commented Feb 24, 2022

Awesome, it'll be in the next release.

@cjdoris cjdoris closed this as completed Feb 24, 2022
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