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
The julia environment worked out fine on my ubuntu, but failed on server.
ERROR: LoadError: ArgumentError: Path to conda environment is not valid.
Stacktrace:
[1] prefix(::String) at /home/lamda/.julia/v0.6/Conda/src/Conda.jl:59
[2] include_from_node1(::String) at ./loading.jl:569
[3] include(::String) at ./sysimg.jl:14
[4] anonymous at ./:2
while loading /home/lamda/.julia/v0.6/Conda/src/Conda.jl, in expression starting on line 64
ERROR: LoadError: Failed to precompile Conda to /home/lamda/.julia/lib/v0.6/Conda.ji.
Stacktrace:
[1] compilecache(::String) at ./loading.jl:703
[2] _require(::Symbol) at ./loading.jl:456
[3] require(::Symbol) at ./loading.jl:398
[4] include_from_node1(::String) at ./loading.jl:569
[5] include(::String) at ./sysimg.jl:14
[6] anonymous at ./:2
while loading /home/lamda/.julia/v0.6/PyCall/src/PyCall.jl, in expression starting on line 28
ERROR: LoadError: Failed to precompile PyCall to /home/lamda/.julia/lib/v0.6/PyCall.ji.
Stacktrace:
[1] compilecache(::String) at ./loading.jl:703
[2] _require(::Symbol) at ./loading.jl:456
[3] require(::Symbol) at ./loading.jl:398
[4] include_from_node1(::String) at ./loading.jl:569
[5] include(::String) at ./sysimg.jl:14
[6] anonymous at ./:2
while loading /home/lamda/.julia/v0.6/PyPlot/src/PyPlot.jl, in expression starting on line 5
ERROR: LoadError: Failed to precompile PyPlot to /home/lamda/.julia/lib/v0.6/PyPlot.ji.
Stacktrace:
[1] compilecache(::String) at ./loading.jl:703
[2] _require(::Symbol) at ./loading.jl:490
[3] require(::Symbol) at ./loading.jl:398
[4] include_from_node1(::String) at ./loading.jl:569
[5] include(::String) at ./sysimg.jl:14
[6] process_options(::Base.JLOptions) at ./client.jl:305
[7] _start() at ./client.jl:371
while loading /home/lamda/huhz/client.jl, in expression starting on line 2
I have a precompile Conda failure with Julia 1.3.1 on Win10 , installed for local user.
Build Conda complains about makedir not having rights to C:/users/Julia
and import conda complains about
LoadError: ArgumentError: Path to conda environment is not valid: C:\Users\julia\AppData\Local\JuliaPro\packages\padding_some_junk_value\in_here\creating_a_pattern_to_be_replaced\conda\3
obviously that path is wrong, but why is it not set? is this meant to be a manual setting I need to make? where?
I made a comment on https://discourse.julialang.org, and hesitated about making a new issue but the issue title is still applicable, even if the version is not 0.6 any more.
ERROR: The following 1 direct dependency failed to precompile:
PyPlot [d330b81b-6aea-500a-939a-2ce795aea3ee]
Failed to precompile PyPlot [d330b81b-6aea-500a-939a-2ce795aea3ee] to "/home/runner/.julia/compiled/v1.10/PyPlot/jl_Dr7FmQ".
ERROR: LoadError: ArgumentError: Path to conda environment is not valid: /home/runner/.julia/conda/3
Stacktrace:
[1] prefix(path::String)
@ Conda ~/.julia/packages/Conda/x2UxR/src/Conda.jl:42
[2] …
It looks like the best chance of solving this would be to add https://github.com/mxschmitt/action-tmate before the failing bit (or is it possible to run it "on-fail"?) Then we could go in and poke around in /home/runner and /home/runner/.julia to try and figure out what happened.
I will note that I had a slightly "model-challenging" moment with regards to Github Actions when reading https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#file-systems . This says that $GITHUB_WORKSPACE is persisted between steps, but it says no such thing about $HOME. I really don't think so, but I wanted to check what others think, is it possible for a Github action to be pre-empted and end up with an empty home directory between steps?
What's happening is that an empty directory is made here and looked for here. Between the build script and the pre-compile script, the directory has gone missing.
This could be worked around in any one of the following ways:
Run _install_conda(ROOTENV) at the very beginning of Conda.jl (it is already run on
Remove the PREFIX, etc. constants and replace them with a method of prefix()
Remove the isdir check in prefix(...)
Specialise prefix(...) for ROOTDIR and run mkdir there
I do not know what exactly is happening, but one possibility is that /home/runner/.julia/conda/3 is available both when build.jl runs and when Conda.jl runs, but at different locations. In that case, perhaps if there is a symlink in the directory path, realdir() could be used in build.jl. Another option would be to add a relative directory, and look in DEPOT_PATH to make an absolute directory when Conda.jl is run.
Another possibility is that the problem occurs because the built Conda package, including deps.jl is getting cached, but the directory /home/runner/.julia/conda/ is not.
@stevengj The problem seems to be persistent, and I believe there are some paths to either a proper fix, or at least a workaround, so perhaps this issue could be reopened?
I agree that there is an issue here regarding a directory that goes missing on Github Actions CI. In my case, I wanted to install a pip-only package when building package documentation to show-off and test Python interoperability, so I also encountered the following error similar to the original:
Activity
stevengj commentedon Apr 4, 2018
What does
print(read(Pkg.dir("Conda", "deps", "deps.jl"), String))output?More informative error message for invalid path
stevengj commentedon Jun 13, 2018
Closing unless this issue re-appears.
vinnief commentedon Mar 4, 2020
I have a precompile Conda failure with Julia 1.3.1 on Win10 , installed for local user.
Build Conda complains about makedir not having rights to C:/users/Julia
and import conda complains about
LoadError: ArgumentError: Path to conda environment is not valid: C:\Users\julia\AppData\Local\JuliaPro\packages\padding_some_junk_value\in_here\creating_a_pattern_to_be_replaced\conda\3
obviously that path is wrong, but why is it not set? is this meant to be a manual setting I need to make? where?
I made a comment on https://discourse.julialang.org, and hesitated about making a new issue but the issue title is still applicable, even if the version is not 0.6 any more.
kerim371 commentedon Apr 28, 2021
I'm newbie in Julia and I have similar problem.
When I type:
Pkg.add("Conda")I get error:
@stevengj when I type
print(read(Pkg.dir("Conda", "deps", "deps.jl"), String))I get:I can't understand does Conda.jl install conda.exe or I have to preinstall it by myself?
kerim371 commentedon Apr 28, 2021
I just found that I can build
Conda.jlon preinstalled conda. But is it possible to buildConda.jlon preinstalled python without preinstalled conda?timholy commentedon Mar 11, 2022
https://github.com/timholy/BasicBlockRewriter.jl/runs/5516227052?check_suite_focus=true
Note the CI script sets the
PYTHONenvironment variableBeastyBlacksmith commentedon Jun 1, 2022
I'm getting the same on the Plots.jl documentation build. Is there some workaround?
frankier commentedon Nov 7, 2022
Now I have the same problem
https://github.com/frankier/ComputerAdaptiveTesting.jl/actions/runs/3408009528/jobs/5668188461
Pasting the error because GitHub actions will delete it at some point
There have also been successful runs
https://github.com/frankier/ComputerAdaptiveTesting.jl/actions/runs/3403780584/jobs/5660539740
Did either of you manage to fix it or otherwise workaround it?
tfiers commentedon Jan 30, 2023
Same here: I cannot have PyPlot installed in CI
(link)
though presumably PyPlot's own CI does run succesfully
https://github.com/JuliaPy/PyPlot.jl/actions/workflows/CI.yml
(unfortunately github has deleted the last logs).
Not sure what's different
frankier commentedon Jan 30, 2023
It looks like the best chance of solving this would be to add https://github.com/mxschmitt/action-tmate before the failing bit (or is it possible to run it "on-fail"?) Then we could go in and poke around in /home/runner and /home/runner/.julia to try and figure out what happened.
I will note that I had a slightly "model-challenging" moment with regards to Github Actions when reading https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#file-systems . This says that
$GITHUB_WORKSPACEis persisted between steps, but it says no such thing about$HOME. I really don't think so, but I wanted to check what others think, is it possible for a Github action to be pre-empted and end up with an empty home directory between steps?What's happening is that an empty directory is made here and looked for here. Between the build script and the pre-compile script, the directory has gone missing.
This could be worked around in any one of the following ways:
_install_conda(ROOTENV)at the very beginning of Conda.jl (it is already run onPREFIX, etc. constants and replace them with a method ofprefix()isdircheck inprefix(...)prefix(...)for ROOTDIR and runmkdirthereI do not know what exactly is happening, but one possibility is that
/home/runner/.julia/conda/3is available both whenbuild.jlruns and whenConda.jlruns, but at different locations. In that case, perhaps if there is a symlink in the directory path,realdir()could be used in build.jl. Another option would be to add a relative directory, and look inDEPOT_PATHto make an absolute directory when Conda.jl is run.Another possibility is that the problem occurs because the built Conda package, including
deps.jlis getting cached, but the directory/home/runner/.julia/conda/is not.@stevengj The problem seems to be persistent, and I believe there are some paths to either a proper fix, or at least a workaround, so perhaps this issue could be reopened?
NeroBlackstone commentedon Jul 7, 2023
Same problem here, this problem should be solved seriously.
lxvm commentedon Nov 1, 2024
I agree that there is an issue here regarding a directory that goes missing on Github Actions CI. In my case, I wanted to install a pip-only package when building package documentation to show-off and test Python interoperability, so I also encountered the following error similar to the original:
However, by forcing PyCall.jl to (re)build in my CI script I was able to get this to work
I made it print some of the paths when working and I get
penelopeysm commentedon Oct 15, 2025
For anyone dropping by via Google: with the release of 1.12 I ran into precompile failures on CI and the same error message
I solved it by deleting the GitHub Actions caches (
https://github.com/{user}/{repo}/actions/caches).CI: create Conda's root environment directory before testing