This should make it easier to manage per project Julia versions without juliaup. Here’s a screenshot showing no global julia installation but a per folder julia install when activating the pixi shell:
For a new project, it’s as simple as the following after installing pixi:
pixi init
pixi project channel add https://repo.prefix.dev/julia-forge
pixi add julia
pixi already supports conda and pip dependencies, and this will (in my opinion) make it easier to introduce julia into python projects that use pixi for package management.
I just tried to install my package KiteModels using julia that I installed with pixi. I get a lot of these warnings:
┌ LinearSolve → LinearSolveRecursiveArrayToolsExt
│ ┌ Warning: CHOLMOD version incompatibility
│ │
│ │ Julia was compiled with CHOLMOD version 4.0.4. It is
│ │ currently linked with version 5.2.1.
│ │ This might cause Julia to terminate when working with
│ │ sparse matrix factorizations, e.g. solving systems of
│ │ equations with \.
│ │
│ │ It is recommended that you use Julia with the same major
│ │ version of CHOLMOD as the one used during the build, or
│ │ download the generic binaries from www.julialang.org,
│ │ which ship with the correct versions of all dependencies.
│ └ @ SparseArrays.CHOLMOD ~/repos/pykitesim/.pixi/envs/default/share/julia/stdlib/v1.10/SparseArrays/src/solvers/cholmod.jl:206
Any idea?
UPDATE:
For now I conclude that installing Julia using pixi is a bad idea because it installs incompatible libraries.
I will continue to use pixi to install Python and the Python libraries and juliaup to install Julia.
@ufechner7 thanks for trying! I would also be interested in which julia you installed (the one linked above, e.g. repackaged, or the one built on conda-forge)?
Indeed, the main challenge is different dynamic libraries (which is something that conda-forge tries to solve globally).
pixi init jtest
cd jtest
pixi project channel add https://repo.prefix.dev/julia-forge
pixi add julia
pixi shell
(jtest) ufechner@framework:~/repos/jtest$ which julia
/home/ufechner/repos/jtest/.pixi/envs/default/bin/julia
julia --project="."
using Pkg
Pkg.add("KiteModels")
Output (well, these massages repeat again and again):
┌ StaticArrayInterface → StaticArrayInterfaceStaticArraysExt
│ ┌ Warning: CHOLMOD version incompatibility
│ │
│ │ Julia was compiled with CHOLMOD version 4.0.4. It is
│ │ currently linked with version 5.2.1.
│ │ This might cause Julia to terminate when working with
│ │ sparse matrix factorizations, e.g. solving systems of
│ │ equations with \.
│ │
│ │ It is recommended that you use Julia with the same major
│ │ version of CHOLMOD as the one used during the build, or
│ │ download the generic binaries from www.julialang.org,
│ │ which ship with the correct versions of all dependencies.
│ └ @ SparseArrays.CHOLMOD ~/repos/jtest/.pixi/envs/default/share/julia/stdlib/v1.10/SparseArrays/src/solvers/cholmod.jl:206
└
┌ Distances → DistancesChainRulesCoreExt
│ ┌ Warning: CHOLMOD version incompatibility
│ │
│ │ Julia was compiled with CHOLMOD version 4.0.4. It is
│ │ currently linked with version 5.2.1.
│ │ This might cause Julia to terminate when working with
│ │ sparse matrix factorizations, e.g. solving systems of
│ │ equations with \.
│ │
│ │ It is recommended that you use Julia with the same major
│ │ version of CHOLMOD as the one used during the build, or
│ │ download the generic binaries from www.julialang.org,
│ │ which ship with the correct versions of all dependencies.
│ └ @ SparseArrays.CHOLMOD ~/repos/jtest/.pixi/envs/default/share/julia/stdlib/v1.10/SparseArrays/src/solvers/cholmod.jl:206
└
pixi.toml:
(jtest) ufechner@framework:~/repos/jtest$ cat pixi.toml
[project]
name = "jtest"
version = "0.1.0"
description = "Add a short description here"
authors = ["Uwe Fechner <u.fechner-1@tudelft.nl>"]
channels = ["conda-forge", "https://repo.prefix.dev/julia-forge/"]
platforms = ["linux-64"]
[tasks]
[dependencies]
julia = ">=1.10.4,<1.11
pixi.lock file is attached. I added the ending .jl to become able to attach it. pixi.lock.jl (30.3 KB)
Hi @ufechner7 - I think you are getting the build of julia from conda-forge. If you change the order of channels you should get the one from julia-forge.
You can validate that by checking the pixi.lock file (I checked the one you attached and it’s indeed the case).
I don’t quite understand why that makes any difference?
The pixi version of julia gets the julia binary from here and juliaup gets it from here, which appear to be the same locations (juliaup downloads from julialang-s3.julialang.org as well).
Here’s what I get as the diff between these two folders
╭─ ~/g/pixi-test
╰ diff -qr .pixi/envs/default julia-1.10.4
Only in julia-1.10.4: LICENSE.md
Only in .pixi/envs/default: build_env.sh
Only in .pixi/envs/default: conda-meta
Only in .pixi/envs/default: conda_build.sh
Only in julia-1.10.4/share/julia/base: .gitignore
Only in julia-1.10.4/share/julia/base/JuliaSyntax: .github
Only in julia-1.10.4/share/julia/base/JuliaSyntax: .gitignore
Only in julia-1.10.4/share/julia/base/JuliaSyntax/sysimage: .gitignore
Only in julia-1.10.4/share/julia/stdlib/v1.10/ArgTools: .github
Only in julia-1.10.4/share/julia/stdlib/v1.10/ArgTools: .gitignore
Only in julia-1.10.4/share/julia/stdlib/v1.10/DelimitedFiles: .github
Only in julia-1.10.4/share/julia/stdlib/v1.10/Downloads: .github
Only in julia-1.10.4/share/julia/stdlib/v1.10/Downloads: .gitignore
Only in julia-1.10.4/share/julia/stdlib/v1.10/LibCURL: .github
Only in julia-1.10.4/share/julia/stdlib/v1.10/LibCURL: .gitignore
Only in julia-1.10.4/share/julia/stdlib/v1.10/NetworkOptions: .github
Only in julia-1.10.4/share/julia/stdlib/v1.10/NetworkOptions: .gitignore
Only in julia-1.10.4/share/julia/stdlib/v1.10/Pkg: .github
Only in julia-1.10.4/share/julia/stdlib/v1.10/Pkg: .gitignore
Only in julia-1.10.4/share/julia/stdlib/v1.10/Pkg/test/test_packages/BigProject: .gitignore
Only in julia-1.10.4/share/julia/stdlib/v1.10/Pkg/test/test_packages/BigProject/SubModule: .gitignore
Only in julia-1.10.4/share/julia/stdlib/v1.10/Pkg/test/test_packages/BigProject/SubModule2: .gitignore
Only in julia-1.10.4/share/julia/stdlib/v1.10/Pkg/test/test_packages/BuildProjectFixedDeps: .gitignore
Only in julia-1.10.4/share/julia/stdlib/v1.10/Pkg/test/test_packages/force_latest_compatible_version/BothOl
dAndNew: .gitignore
Only in julia-1.10.4/share/julia/stdlib/v1.10/Pkg/test/test_packages/force_latest_compatible_version/Direct
DepWithoutCompatEntry: .gitignore
Only in julia-1.10.4/share/julia/stdlib/v1.10/Pkg/test/test_packages/force_latest_compatible_version/NewOnl
y: .gitignore
Only in julia-1.10.4/share/julia/stdlib/v1.10/Pkg/test/test_packages/force_latest_compatible_version/OldOnly1: .gitignore
Only in julia-1.10.4/share/julia/stdlib/v1.10/Pkg/test/test_packages/force_latest_compatible_version/OldOnly2: .gitignore
Only in julia-1.10.4/share/julia/stdlib/v1.10/SHA: .github
Only in julia-1.10.4/share/julia/stdlib/v1.10/SHA: .gitignore
Only in julia-1.10.4/share/julia/stdlib/v1.10/SHA/docs: .gitignore
Only in julia-1.10.4/share/julia/stdlib/v1.10/SparseArrays: .github
Only in julia-1.10.4/share/julia/stdlib/v1.10/Statistics: .github
Only in julia-1.10.4/share/julia/stdlib/v1.10/SuiteSparse: .github
Only in julia-1.10.4/share/julia/stdlib/v1.10/TOML: .gitignore
Only in julia-1.10.4/share/julia/stdlib/v1.10/Tar: .github
Only in julia-1.10.4/share/julia/stdlib/v1.10/Tar: .gitignore
Only in julia-1.10.4/share/julia/test: .gitignore
Only in julia-1.10.4/share/julia/test/clangsa: .gitignore
Only in julia-1.10.4/share/julia/test/embedding: .gitignore
Only in julia-1.10.4/share/julia/test/gcext: .gitignore
Only in julia-1.10.4/share/julia/test/llvmpasses: .gitignore
I’ve activated the environment using direnv, so the same environment variables are active for both julia versions, and it still errors only for the pixi version.
I don’t see any LD_LIBRARY_PATH modifications that seem unusual in the .pixi folder:
$ rg LD_LIBRARY_PATH .pixi
.pixi/envs/default/share/doc/julia/html/en/devdocs/build/linux.html
6:</script><script data-outdated-warner src="../../assets/warner.js"></script><link href="https://cdnjs.cloudflare.com/ajax/libs/lato-font/3.0.0/css/lato-font.min.css" rel="stylesheet" type="text/css"/><link href="ht
tp [... 1 more match]
.pixi/envs/default/share/doc/julia/html/en/devdocs/build/macos.html
6:</script><script data-outdated-warner src="../../assets/warner.js"></script><link href="https://cdnjs.cloudflare.com/ajax/libs/lato-font/3.0.0/css/lato-font.min.css" rel="stylesheet" type="text/css"/><link href="http [... 2 more matches]
.pixi/envs/default/share/julia/test/clangsa/Makefile
14:LD_LIBRARY_PATH="${build_libdir}:$$LD_LIBRARY_PATH" \
.pixi/envs/default/share/julia/test/llvmpasses/Makefile
14:LD_LIBRARY_PATH=${build_libdir}:$$LD_LIBRARY_PATH \
22:LD_LIBRARY_PATH=${build_libdir}:$$LD_LIBRARY_PATH \
29:LD_LIBRARY_PATH=${build_libdir}:$$LD_LIBRARY_PATH \
.pixi/envs/default/share/doc/julia/html/en/search_index.js
2:[{"location":"stdlib/CRC32c.html","page":"CRC32c","title":"CRC32c","text":"EditURL = \"https://github.com/JuliaLang/julia/blob/master/stdlib/CRC32c/docs/src/index.md\"","category":"page"},{"location":"stdlib/CRC32c.h [... 3 more matches]
.pixi/envs/default/share/julia/base/linking.jl
26:const LIBPATH_env = "LD_LIBRARY_PATH"
.pixi/envs/default/share/julia/stdlib/v1.10/LLD_jll/src/LLD_jll.jl
34:const LIBPATH_env = "LD_LIBRARY_PATH"
.pixi/envs/default/share/julia/stdlib/v1.10/Downloads/src/Curl/utils.jl
44:2. You are overriding the library load path by setting `LD_LIBRARY_PATH`, in which case you are in advanced usage territory. You can try upgrading the system libcurl, unsetting `LD_LIBRARY_PATH`, or otherwise arrangi [... 0 more matches]
.pixi/envs/default/share/julia/stdlib/v1.10/p7zip_jll/src/p7zip_jll.jl
33:const LIBPATH_env = "LD_LIBRARY_PATH"
I don’t know exactly how pixi works, but these were the only files that had a lot of environment variables, and thought I’d try to delete them. But I still get an error: