- Notifications
You must be signed in to change notification settings - Fork 78
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Affects: JuliaCall
Describe the bug
Hi, I'm using pixi to manage the dependencies, and specified in the pyproject.toml
dependencies = [ "juliacall (>=0.9.0,<1.0.0)", ]Then, I generated the lock file with pixi lock. I only need 1 Julia package, which I specified in juliapkg.json
{"julia": "1.10", "packages":{"PeriodicMatrices.jl":{"uuid": "dd9cd634-6083-4ae5-8f2e-b983833de2bb", "version": "0.1.11" } } }For starting, I copy pasted the example from your guide in a python script
fromjuliacallimportMainasjljl.println("Hello from Julia!")Running this file with pixi run python script.py produces
[juliapkg] Found dependencies: c:\users\...\juliapkg.json [juliapkg] Found dependencies: c:\users\...\.pixi\envs\...\lib\site-packages\juliapkg\juliapkg.json [juliapkg] Found dependencies: c:\...\.pixi\envs\...\lib\site-packages\juliacall\juliapkg.json [juliapkg] Locating Julia ^1.10.3 [juliapkg] Using Julia 1.11.6 at C:\Users\...\.julia\juliaup\julia-1.11.6+0.x64.w64.mingw32\bin\julia.exe [juliapkg] Using Julia project at C:\Users\...\Documents\Projects\wtstab\sysid\.pixi\envs\dev\julia_env [juliapkg] Writing Project.toml: [deps] PeriodicMatrices.jl = "dd9cd634-6083-4ae5-8f2e-b983833de2bb" PythonCall = "6099a3de-0909-46bc-b1f4-468b9a2dfc0d" OpenSSL_jll = "458c3c95-2e84-50aa-8efc-19380b2a3a95" [compat] PeriodicMatrices.jl = "^0.1.11" PythonCall = "=0.9.27" OpenSSL_jll = "3.0.0 - 3.5" [juliapkg] Installing packages: import Pkg Pkg.Registry.update() Pkg.add([ Pkg.PackageSpec(name="PeriodicMatrices.jl", uuid="dd9cd634-6083-4ae5-8f2e-b983833de2bb"), Pkg.PackageSpec(name="PythonCall", uuid="6099a3de-0909-46bc-b1f4-468b9a2dfc0d"), Pkg.PackageSpec(name="OpenSSL_jll", uuid="458c3c95-2e84-50aa-8efc-19380b2a3a95"), ]) Pkg.resolve() Pkg.precompile() ERROR: TypeError: in typeassert, expected String, got a value of type Dict{String, Any} Stacktrace: [1] get_uuid_name(project::Dict{String, Any}, uuid::Base.UUID) @ Base .\loading.jl:3515 [2] collect_preferences(project_toml::String, uuid::Base.UUID) @ Base .\loading.jl:3559 [3] get_preferences(uuid::Base.UUID) @ Base .\loading.jl:3625 [4] get_preferences_hash(uuid::Base.UUID, prefs_list::Vector{String}) @ Base .\loading.jl:3638 [5] stale_cachefile(modkey::Base.PkgId, build_id::UInt128, modpath::String, cachefile::String; ignore_loaded::Bool, requested_flags::Base.CacheFlags, reasons::Dict{String, Int64}, stalecheck::Bool) @ Base .\loading.jl:3948 [6] stale_cachefile @ .\loading.jl:3733 [inlined] [7] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String, build_id::UInt128, stalecheck::Bool; reasons::Dict{String, Int64}, DEPOT_PATH::Vector{String}) @ Base .\loading.jl:1985 [8] _require(pkg::Base.PkgId, env::String) @ Base .\loading.jl:2527 [9] __require_prelocked(uuidkey::Base.PkgId, env::String) @ Base .\loading.jl:2388 [10] #invoke_in_world#3 @ .\essentials.jl:1089 [inlined] [11] invoke_in_world @ .\essentials.jl:1086 [inlined] [12] _require_prelocked(uuidkey::Base.PkgId, env::String) @ Base .\loading.jl:2375 [13] macro expansion @ .\loading.jl:2314 [inlined] [14] macro expansion @ .\lock.jl:273 [inlined] [15] __require(into::Module, mod::Symbol) @ Base .\loading.jl:2271 [16] #invoke_in_world#3 @ .\essentials.jl:1089 [inlined] [17] invoke_in_world @ .\essentials.jl:1086 [inlined] [18] require(into::Module, mod::Symbol) @ Base .\loading.jl:2260 Traceback (most recent call last): File "C:\Users\...\script.py", line 1, in <module> from juliacall import Main as jl File "C:\Users\...\.pixi\envs\...\Lib\site-packages\juliacall\__init__.py", line 288, in <module> init() ~~~~^^ File "C:\Users\...\.pixi\envs\...\Lib\site-packages\juliacall\__init__.py", line 160, in init CONFIG['exepath'] = exepath = juliapkg.executable() ~~~~~~~~~~~~~~~~~~~^^ File "C:\Users\...\.pixi\envs\...\Lib\site-packages\juliapkg\deps.py", line 435, in executable resolve() ~~~~~~~^^ File "C:\Users\...\.pixi\envs\...\Lib\site-packages\juliapkg\deps.py", line 396, in resolve run( ~~~^ [ ^ ...<7 lines>... env=env, ^^^^^^^^ ) ^ File "C:\Users\...\.pixi\envs\dev\Lib\subprocess.py", line 577, in run raise CalledProcessError(retcode, process.args, output=stdout, stderr=stderr) subprocess.CalledProcessError: Command '['C:\\Users\\...\\.julia\\juliaup\\julia-1.11.6+0.x64.w64.mingw32\\bin\\julia.exe', '--project=C:\\Users\\...\\.pixi\\envs\\...\\julia_env', '--startup-file=no', '-e', 'import Pkg\nPkg.Registry.update()\nPkg.add([\n Pkg.PackageSpec(name="PeriodicMatrices.jl", uuid="dd9cd634-6083-4ae5-8f2e-b983833de2bb"),\n Pkg.PackageSpec(name="PythonCall", uuid="6099a3de-0909-46bc-b1f4-468b9a2dfc0d"),\n Pkg.PackageSpec(name="OpenSSL_jll", uuid="458c3c95-2e84-50aa-8efc-19380b2a3a95"),\n])\nPkg.resolve()\nPkg.precompile()']' returned non-zero exit status 1. This package installs perfectly fine with Julia Pkg.
Your system
Please provide detailed information about your system:
- Windows 11
- Julia 1.11, python 3.12
Additional context
Add any other context about the problem here.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working