Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

`find_julia` uses the juliaup launcher without an error when `juliaup add` does not install the selected version

Open Beginner friendly
#102 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
82/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
julia, python
Domain
backend, devtools

Research direction

Start in src/juliapkg/find_julia.py at the JuliaUp installation and lookup paths identified in the issue. Check how juliaup add success is handled and what happens when the selected executable cannot be found. Reproduce with an already installed channel that points to an older version; done means the selected version is used or an error is raised instead of saving the launcher path.

Written by the indexing model from the issue text.

Description

Description

When juliapkg resolves an environment, find_julia(upgrade=True) selects the newest compatible version in juliaup list. If this version is not installed, ju_find_julia runs juliaup add <channel> (find_julia.py#L158).

If the channel is already installed, juliaup add does not install the new version. It prints '1' is already installed. and returns exit code 0. juliapkg accepts exit code 0 as a successful installation.

Then juliapkg cannot find the selected version. Line 171 creates an exception, but it does not raise it:

Exception(f"JuliaUp just installed Julia {ver} but cannot find it")

Thus, find_julia continues and uses shutil.which("julia"). This path is the juliaup launcher ~/.juliaup/bin/julia, not a real Julia executable. juliapkg writes this path to meta.json.

With juliacall 0.9.35, Julia does not start:

ERROR: could not load library "~/.juliaup/bin/../lib/julia/sys.so"

juliacall 0.9.37 fixes this sys.so error (JuliaPy/PythonCall.jl#816). But juliapkg still uses the launcher and not the selected Julia version.

Steps to reproduce

The channel 1 must be installed and must point to an old version. This occurs when you install the channel 1 and do not run juliaup update after a new release.

  1. Install Julia 1.12.7:
    juliaup add 1.12.7
    
  2. Make the channel 1 point to 1.12.7. To get this state quickly, add this entry to InstalledChannels in ~/.julia/juliaup/juliaup.json:
    "1": {"Version": "1.12.7+0.x64.linux.gnu"}
    
  3. Make sure that juliaup status shows the update 1.13.2 for channel 1.
  4. Make a new virtual environment. Install juliapkg==0.1.27 and juliacall==0.9.35. Do not add a juliapkg.json file.
  5. Run this script:
    import juliapkg
    juliapkg.resolve(force=True)
    print(juliapkg.executable())
    from juliacall import Main as jl
    
Expected result

juliapkg installs Julia 1.13.2 and uses it. If it cannot install it, juliapkg raises an error.

Actual result

juliapkg logs an installation of 1.13.2, but it uses the launcher with version 1.12.7. It does not show a warning:

[juliapkg] Locating Julia ^1.10.3
[juliapkg] Installing Julia 1.13.2 using JuliaUp
[juliapkg] Using Julia 1.12.7 at ~/.juliaup/bin/julia

juliapkg.executable() returns ~/.juliaup/bin/julia. Then import juliacall fails with the sys.so error above.

If the channel 1 is not installed, the same steps work correctly: juliapkg installs 1.13.2 and uses ~/.julia/juliaup/julia-1.13.2+0.x64.linux.gnu/bin/julia.

Versions
  • juliapkg 0.1.27 (the code is the same on main)
  • juliacall 0.9.35 and 0.9.37
  • juliaup 1.22.7
  • Python 3.12, Linux x86_64
Possible fix
  1. Add raise on line 171.
  2. In ju_find_julia, try the exact-version channel first (for example 1.13.2). juliaup add 1.13.2 always installs that version.
Workaround

Pin the exact Julia version in juliapkg.json, for example "julia": "=1.12.7".

Related

#39 (automatic Julia upgrade)

Dominant language
Python
Stars
67
Forks
24
Avg merge
2d 9h
Merged PRs (30d)
2

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from JuliaPy/pyjuliapkg

All issues in JuliaPy/pyjuliapkg

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.