You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 ?
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?
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.
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.
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.
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.
Activity
xgdgsc commentedon May 29, 2025
I don' t understand why doing
from juliacall import Main as jlwould make it trying things online? Can we just make it totoally offline when importing and only do online stuff withjuliapkg?cjdoris commentedon May 29, 2025
Ah the docs maybe aren't clear, if you are trying to use a pre-installed Julia, set
PYTHON_JULIAPKG_EXE.xgdgsc commentedon May 29, 2025
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?
cjdoris commentedon May 29, 2025
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_DEPOTmight 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.
cjdoris commentedon May 29, 2025
Thinking a bit more:
PYTHON_JULIAPKG_EXEwill use a specific Julia, so won't download one.PYTHON_JULIAPKG_OFFLINE=yeswill prevent any packages from being downloaded.PYTHON_JULIAPKG_PROJECTto its path.JULIA_DEPOTif your depot is not in the default place.cjdoris commentedon May 29, 2025
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.
cjdoris commentedon May 29, 2025
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.