Skip to content

PYTHON_JULIACALL_BINDIR not effective? #619

Open

Description

@xgdgsc

Affects: JuliaCall
From my understanding it still tries to connect the internet when call
https://github.com/JuliaPy/PythonCall.jl/blob/0a7d49f274147e9876fee47981d9aa5459f6eb8c/pysrc/juliacall/__init__.py#L160C44-L160C54 ?
Describe the bug
PYTHON_JULIACALL_BINDIR not effective. It still tries to connect the internet and install julia?

Image

Your system
linux centos 7

Additional context
Add any other context about the problem here.

Activity

  1. xgdgsc commented on May 29, 2025

    @xgdgsc
    Author

    I don' t understand why doing from juliacall import Main as jl would make it trying things online? Can we just make it totoally offline when importing and only do online stuff with juliapkg ?

  2. cjdoris commented on May 29, 2025

    @cjdoris
    Member

    Ah the docs maybe aren't clear, if you are trying to use a pre-installed Julia, set PYTHON_JULIAPKG_EXE.

  3. xgdgsc commented on May 29, 2025

    @xgdgsc
    Author

    Thanks for the tip. Is there a way to import without any attempt to do online staff? I want to share a depot to other python user on same machine without any knowledge of julia to use a self hosted git master julia package. What' s the recommended way to do something like this now?

  4. cjdoris commented on May 29, 2025

    @cjdoris
    Member

    I've not had to do that before so not sure, but some combination of PYTHON_JULIAPKG_EXE, PYTHON_JULIAPKG_PROJECT, PYTHON_JULIAPKG_OFFLINE, JULIA_DEPOT might help.

    For a bit on how juliapkg works: it will only download things if it needs to, namely it downloads Julia if you don't have a compatible version already and it downloads packages when dependencies change. So if you resolve once it will not go online again unless any of your dependencies change.

    So one way to solve your problem would be to resolve once and then copy the whole filesystem state to your offline system.

    Let me know if you figure it out - would be good to add this to the FAQs.

  5. cjdoris commented on May 29, 2025

    @cjdoris
    Member

    Thinking a bit more:

    • Setting PYTHON_JULIAPKG_EXE will use a specific Julia, so won't download one.
    • Setting PYTHON_JULIAPKG_OFFLINE=yes will prevent any packages from being downloaded.
    • However this means the Julia project used will not have any packages. So you should create the project you need yourself and set PYTHON_JULIAPKG_PROJECT to its path.
    • Possibly set JULIA_DEPOT if your depot is not in the default place.
  6. cjdoris commented on May 29, 2025

    @cjdoris
    Member

    If what you actually want is to have a read-only depot but let people create their own projects from it while offline, that may require some changes to juliapkg.

  7. cjdoris commented on May 29, 2025

    @cjdoris
    Member

    I think I'm going to change how offline mode behaves in juliapkg. Instead of just skipping installing packages entirely, I'll change it to do the same package install steps but with Julia's package manager in offline mode so it can install already-downloaded packages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions