# Error when precompiling packages that rely on PythonCall

**URL:** <https://discourse.julialang.org/t/error-when-precompiling-packages-that-rely-on-pythoncall/132371>\
**Category:** General Usage\
**Tags:** pythoncall, conda\
**Created:** [September 14, 2025, 3:03pm UTC](https://discourse.julialang.org/t/error-when-precompiling-packages-that-rely-on-pythoncall/132371 "2025-09-14T15:03:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![opsssi](https://avatars.discourse-cdn.com/v4/letter/o/5fc32e/32.png) [@opsssi](https://discourse.julialang.org/u/opsssi)\
**Post date:** [September 14, 2025, 3:03pm UTC](https://discourse.julialang.org/t/error-when-precompiling-packages-that-rely-on-pythoncall/132371/1 "2025-09-14T15:03:06Z")

</div>

Hi!

I have a problem when trying to use the Package OptimizationSciPy.jl (and I got the same error previously when trying to install other packages that require PythonCall.

> **versioninfo**
>
> ```julia-auto
> Julia Version 1.11.6
> Commit 9615af0f26 (2025-07-09 12:58 UTC)
> Build Info:
> Official https://julialang.org/ release
> Platform Info:
> OS: Windows (x86_64-w64-mingw32)
> CPU: 14 × Intel(R) Core(TM) Ultra 7 165U
> WORD_SIZE: 64
> LLVM: libLLVM-16.0.6 (ORCJIT, alderlake)
> Threads: 1 default, 0 interactive, 1 GC (on 14 virtual cores)
> Environment:
> JULIA_EDITOR = code
> JULIA_VSCODE_REPL = 1
> 
> ```

> **\]add OptimizationSciPy**
>
> ```julia-auto
> julia> Pkg.add("OptimizationSciPy")
> Resolving package versions...
> No Changes to `C:\Users\INIT\.julia\environments\v1.11\Project.toml`
> No Changes to `C:\Users\INIT\.julia\environments\v1.11\Manifest.toml`
> Precompiling project...
> ✗ SciMLBase → SciMLBasePythonCallExt
> ✗ OptimizationSciPy
> 0 dependencies successfully precompiled in 155 seconds. 676 already precompiled.
> 2 dependencies errored.
> For a report of the errors see `julia> err`. To retry use `pkg> precompile`
> 
> ```

> **err**
>
> ```julia-auto
> 
> PkgPrecompileError: The following 1 direct dependency failed to precompile:
> 
> OptimizationSciPy 
> 
> Failed to precompile OptimizationSciPy [cce07bd8-c79b-4b00-aee8-8db9cce22837] to "C:\\Users\\INIT\\.julia\\compiled\\v1.11\\OptimizationSciPy\\jl_257A.tmp".
> CondaPkg Found dependencies: C:\Users\INIT\.julia\packages\PythonCall\IOKTD\CondaPkg.toml
> CondaPkg Found dependencies: C:\Users\INIT\.julia\packages\OptimizationSciPy\0QVwM\CondaPkg.toml
> CondaPkg Resolving changes
> + numpy
> + openssl
> + python
> + scipy
> CondaPkg Initialising pixi
> │ C:\Users\INIT\.julia\artifacts\aa881b8313f97d7b8797934574a1cfe551f85222\bin\pixi.exe
> │ init
> │ --format pixi
> └ C:\Users\INIT\.julia\environments\v1.11\.CondaPkg
> Created C:\Users\INIT\.julia\environments\v1.11\.CondaPkg\pixi.toml
> CondaPkg Wrote C:\Users\INIT\.julia\environments\v1.11\.CondaPkg\pixi.toml
> │ [dependencies]
> │ openssl = ">=3, <3.6"
> │ numpy = "*"
> │ scipy = "*"
> │
> │ [dependencies.python]
> │ channel = "conda-forge"
> │ build = "*cp*"
> │ version = ">=3.9,<4"
> │
> │ [project]
> │ name = ".CondaPkg"
> │ platforms = ["win-64"]
> │ channels = ["conda-forge"]
> │ channel-priority = "strict"
> └ description = "automatically generated by CondaPkg.jl"
> CondaPkg Installing packages
> │ C:\Users\INIT\.julia\artifacts\aa881b8313f97d7b8797934574a1cfe551f85222\bin\pixi.exe
> │ install
> └ --manifest-path C:\Users\INIT\.julia\environments\v1.11\.CondaPkg\pixi.toml
> Error:
> × EOF while parsing a value at line 1 column 0
> 
> ERROR: LoadError: InitError: failed process: Process(setenv(`'C:\Users\INIT\.julia\artifacts\aa881b8313f97d7b8797934574a1cfe551f85222\bin\pixi.exe' install --manifest-path 'C:\Users\INIT\.julia\environments\v1.11\.CondaPkg\pixi.toml'`,["PATH=C:\\Users\\INIT\\.julia\\juliaup\\julia-1.11.6+0.x64.w64.mingw32\\bin\\..\\lib\\julia;C:\\Users\\INIT\\.julia\\juliaup\\julia-1.11.6+0.x64.w64.mingw32\\bin\\..\\lib;C:\\Users\\INIT\\.julia\\juliaup\\julia-1.11.6+0.x64.w64.mingw32\\bin;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Windows\\System32\\OpenSSH\\;C:\\Program Files\\1E\\Client\\Extensibility\\NomadBranch;C:\\Users\\INIT\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\INIT\\AppData\\Local\\Programs\\Microsoft VS Code\\bin;C:\\Users\\INIT\\AppData\\Local\\Programs\\Git\\cmd;C:\\isis21\\oracle\\ora19.8_64bit\\bin;C:\\isis21\\oracle\\ora19.8_32bit\\bin", "USERDOMAIN_ROAMINGPROFILE=CORP", "HOMEPATH=\\Users\\INIT", "PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC", "SESSIONNAME=Console", "VSCODE_NONCE=d08453c4-c171-44db-ae9f-794bb5052675", "SYSTEMROOT=C:\\Windows", "APPDATA=C:\\Users\\INIT\\AppData\\Roaming", "PSMODULEPATH=C:\\Program Files\\WindowsPowerShell\\Modules;C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\Modules", "COMMONPROGRAMW6432=C:\\Program Files\\Common Files" … "PROGRAMFILES=C:\\Program Files", "CHROME_CRASHPAD_PIPE_NAME=\\\\.\\pipe\\crashpad_20316_LWLJQUZYUTLQVPSN", "LOGONSERVER=\\\\PF5ELQ9P", "DRIVERDATA=C:\\Windows\\System32\\Drivers\\DriverData", "ORIGINAL_XDG_CURRENT_DESKTOP=undefined", "JULIA_LOAD_PATH=C:\\Users\\INIT\\.julia\\environments\\v1.11\\Project.toml;C:\\Users\\INIT\\.julia\\juliaup\\julia-1.11.6+0.x64.w64.mingw32\\share\\julia\\stdlib\\v1.11", "SYSTEMDRIVE=C:", "__COMPAT_LAYER=DetectorsAppHealth", "PROCESSOR_ARCHITECTURE=AMD64", "OPENBLAS_MAIN_FREE=1"]), ProcessExited(1)) [1]
> 
> Stacktrace:
> [1] pipeline_error
> @ .\process.jl:598 [inlined]
> [2] run(::Cmd; wait::Bool)
> @ Base .\process.jl:513
> [3] run(::Cmd)
> @ Base .\process.jl:510
> [4] _run(io::IO, cmd::Cmd, args::Any; flags::Any)
> @ CondaPkg C:\Users\INIT\.julia\packages\CondaPkg\JnPvc\src\resolve.jl:761
> [5] _run(io::IO, cmd::Cmd, args::Any)
> @ CondaPkg C:\Users\INIT\.julia\packages\CondaPkg\JnPvc\src\resolve.jl:755
> [6] (::CondaPkg.var"#72#81"{Bool, IOContext{Base.PipeEndpoint}, String, Vector{CondaPkg.PipPkgSpec}, Vector{CondaPkg.PkgSpec}, Vector{CondaPkg.ChannelSpec}})()
> @ CondaPkg C:\Users\INIT\.julia\packages\CondaPkg\JnPvc\src\resolve.jl:1053
> [7] cd(f::CondaPkg.var"#72#81"{Bool, IOContext{Base.PipeEndpoint}, String, Vector{CondaPkg.PipPkgSpec}, Vector{CondaPkg.PkgSpec}, Vector{CondaPkg.ChannelSpec}}, dir::String)
> @ Base.Filesystem .\file.jl:101
> [8] resolve(; force::Bool, io::IO, interactive::Bool, dry_run::Bool)
> @ CondaPkg C:\Users\INIT\.julia\packages\CondaPkg\JnPvc\src\resolve.jl:986
> [9] resolve()
> @ CondaPkg C:\Users\INIT\.julia\packages\CondaPkg\JnPvc\src\resolve.jl:764
> [10] envdir()
> @ CondaPkg C:\Users\INIT\.julia\packages\CondaPkg\JnPvc\src\env.jl:70
> [11] init_context()
> @ PythonCall.C C:\Users\INIT\.julia\packages\PythonCall\IOKTD\src\C\context.jl:63
> [12] __init__ ()
> @ PythonCall.C C:\Users\INIT\.julia\packages\PythonCall\IOKTD\src\C\C.jl:26
> [13] run_module_init(mod::Module, i::Int64)
> @ Base .\loading.jl:1378
> [14] register_restored_modules(sv::Core.SimpleVector, pkg::Base.PkgId, path::String)
> @ Base .\loading.jl:1366
> [15] _include_from_serialized(pkg::Base.PkgId, path::String, ocachepath::String, depmods::Vector{Any}, ignore_native::Nothing; register::Bool)
> @ Base .\loading.jl:1254
> [16] _include_from_serialized (repeats 2 times)
> @ .\loading.jl:1210 [inlined]
> [17] _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:2057
> [18] _require(pkg::Base.PkgId, env::String)
> @ Base .\loading.jl:2527
> [19] __require_prelocked(uuidkey::Base.PkgId, env::String)
> @ Base .\loading.jl:2388
> [20] #invoke_in_world#3
> @ .\essentials.jl:1089 [inlined]
> [21] invoke_in_world
> @ .\essentials.jl:1086 [inlined]
> [22] _require_prelocked(uuidkey::Base.PkgId, env::String)
> @ Base .\loading.jl:2375
> [23] macro expansion
> @ .\loading.jl:2314 [inlined]
> [24] macro expansion
> @ .\lock.jl:273 [inlined]
> [25] __require(into::Module, mod::Symbol)
> @ Base .\loading.jl:2271
> [26] #invoke_in_world#3
> @ .\essentials.jl:1089 [inlined]
> [27] invoke_in_world
> @ .\essentials.jl:1086 [inlined]
> [28] require(into::Module, mod::Symbol)
> @ Base .\loading.jl:2260
> [29] include
> @ .\Base.jl:562 [inlined]
> [30] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::Nothing)      
> @ Base .\loading.jl:2881
> [31] top-level scope
> @ stdin:6
> during initialization of module C
> in expression starting at C:\Users\INIT\.julia\packages\OptimizationSciPy\0QVwM\src\OptimizationSciPy.jl:2     
> in expression starting at stdin:
> 
> ```

What I tried so far:

- Update all packages
- Removed and reinstalled OptimizationSciPy.jl, Conda.jl
- ]build PyCall
- Deleted the subdirectories of the error message: C:\Users\INIT.julia\artifacts\aa881b8313f97d7b8797934574a1cfe551f85222 and C:\Users\INIT.julia\environments\v1.11.CondaPkg\

After the last point, I actually got a different error message:

> **err**
>
> ```julia-auto
> PkgPrecompileError: The following 1 direct dependency failed to precompile:
> 
> OptimizationSciPy
> 
> Failed to precompile OptimizationSciPy [cce07bd8-c79b-4b00-aee8-8db9cce22837] to "C:\\Users\\INIT\\.julia\\compiled\\v1.11\\OptimizationSciPy\\jl_BA24.tmp".
> CondaPkg Found dependencies: C:\Users\INIT\.julia\packages\PythonCall\IOKTD\CondaPkg.toml
> CondaPkg Found dependencies: C:\Users\INIT\.julia\packages\OptimizationSciPy\0QVwM\CondaPkg.toml
> CondaPkg Resolving changes
> + numpy
> + openssl
> + python
> + scipy
> CondaPkg Initialising pixi
> │ C:\Users\INIT\.julia\artifacts\aa881b8313f97d7b8797934574a1cfe551f85222\bin\pixi.exe
> │ init
> │ --format pixi
> └ C:\Users\INIT\.julia\environments\v1.11\.CondaPkg
> Created C:\Users\INIT\.julia\environments\v1.11\.CondaPkg\pixi.toml
> CondaPkg Wrote C:\Users\INIT\.julia\environments\v1.11\.CondaPkg\pixi.toml
> │ [dependencies]
> │ openssl = ">=3, <3.6"
> │ numpy = "*"
> │ scipy = "*"
> │
> │ [dependencies.python]
> │ channel = "conda-forge"
> │ build = "*cp*"
> │ version = ">=3.9,<4"
> │
> │ [project]
> │ name = ".CondaPkg"
> │ platforms = ["win-64"]
> │ channels = ["conda-forge"]
> │ channel-priority = "strict"
> └ description = "automatically generated by CondaPkg.jl"
> CondaPkg Installing packages
> │ C:\Users\INIT\.julia\artifacts\aa881b8313f97d7b8797934574a1cfe551f85222\bin\pixi.exe
> │ install
> └ --manifest-path C:\Users\INIT\.julia\environments\v1.11\.CondaPkg\pixi.toml
> Error:
> × Failed to run activation script for Default. Status: exit code: 1.
> │ Stdout: . Stderr: This program is blocked by group policy. For more
> │ information, contact your system administrator.
> │ . Script: @chcp 65001 > nul
> │ @SET
> │ @ECHO ____RATTLER_ENV_START____
> │
> │ @SET "Path=C:
> │ \Users\INIT\.julia\environments\v1.11\.CondaPkg\.pixi\envs\default;C:
> │ \Users\INIT\.julia\environments\v1.11\.CondaPkg\.pixi\envs\default\Library
> │ /mingw-w64/bin;C:
> │ \Users\INIT\.julia\environments\v1.11\.CondaPkg\.pixi\envs\default\Library
> │ /usr/bin;C:
> │ \Users\INIT\.julia\environments\v1.11\.CondaPkg\.pixi\envs\default\Library
> │ /bin;C:
> │ \Users\INIT\.julia\environments\v1.11\.CondaPkg\.pixi\envs\default\Scripts
> │ ;C:\Users\INIT\.julia\environments\v1.11\.CondaPkg\.pixi\envs\default\bin;
> │ %Path%"
> │ @SET "CONDA_PREFIX=C:
> │ \Users\INIT\.julia\environments\v1.11\.CondaPkg\.pixi\envs\default"
> │ @SET "PIXI_PROJECT_MANIFEST=C:
> │ \Users\INIT\.julia\environments\v1.11\.CondaPkg\pixi.toml"
> │ @SET "PIXI_EXE=C:
> │ \Users\INIT\.julia\artifacts\aa881b8313f97d7b8797934574a1cfe551f85222\bin\
> │ pixi.exe"
> │ @SET "PIXI_PROJECT_ROOT=C:\Users\INIT\.julia\environments\v1.11\.CondaPkg"
> │ @SET "PIXI_PROJECT_VERSION=NO_VERSION_SPECIFIED"
> │ @SET "PIXI_IN_SHELL=1"
> │ @SET "PIXI_PROJECT_NAME=.CondaPkg"
> │ @SET "CONDA_DEFAULT_ENV=.CondaPkg"
> │ @SET "PIXI_ENVIRONMENT_NAME=default"
> │ @SET "PIXI_ENVIRONMENT_PLATFORMS=win-64"
> │ @SET "PIXI_PROMPT=(.CondaPkg) "
> │ @CALL "C:
> │ \Users\INIT\.julia\environments\v1.11\.CondaPkg\.pixi\envs\default\etc/
> │ conda/activate.d\libxml2-split_activate.bat"
> │ @CALL "C:
> │ \Users\INIT\.julia\environments\v1.11\.CondaPkg\.pixi\envs\default\etc/
> │ conda/activate.d\openssl_activate-win.bat"
> │ @ECHO ____RATTLER_ENV_START____
> │ @SET
> │
> 
> ERROR: LoadError: InitError: failed process: Process(setenv(`'C:\Users\INIT\.julia\artifacts\aa881b8313f97d7b8797934574a1cfe551f85222\bin\pixi.exe' install --manifest-path 'C:\Users\INIT\.julia\environments\v1.11\.CondaPkg\pixi.toml'`,["PATH=C:\\Users\\INIT\\.julia\\juliaup\\julia-1.11.6+0.x64.w64.mingw32\\bin\\..\\lib\\julia;C:\\Users\\INIT\\.julia\\juliaup\\julia-1.11.6+0.x64.w64.mingw32\\bin\\..\\lib;C:\\Users\\INIT\\.julia\\juliaup\\julia-1.11.6+0.x64.w64.mingw32\\bin;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Windows\\System32\\OpenSSH\\;C:\\Program Files\\1E\\Client\\Extensibility\\NomadBranch;C:\\Users\\INIT\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\INIT\\AppData\\Local\\Programs\\Microsoft VS Code\\bin;C:\\Users\\INIT\\AppData\\Local\\Programs\\Git\\cmd;C:\\isis21\\oracle\\ora19.8_64bit\\bin;C:\\isis21\\oracle\\ora19.8_32bit\\bin", "USERDOMAIN_ROAMINGPROFILE=CORP", "HOMEPATH=\\Users\\INIT", "PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC", "SESSIONNAME=Console", "VSCODE_NONCE=d08453c4-c171-44db-ae9f-794bb5052675", "SYSTEMROOT=C:\\Windows", "APPDATA=C:\\Users\\INIT\\AppData\\Roaming", "PSMODULEPATH=C:\\Program Files\\WindowsPowerShell\\Modules;C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\Modules", "COMMONPROGRAMW6432=C:\\Program Files\\Common Files" … "PROGRAMFILES=C:\\Program Files", "CHROME_CRASHPAD_PIPE_NAME=\\\\.\\pipe\\crashpad_20316_LWLJQUZYUTLQVPSN", "LOGONSERVER=\\\\PF5ELQ9P", "DRIVERDATA=C:\\Windows\\System32\\Drivers\\DriverData", "ORIGINAL_XDG_CURRENT_DESKTOP=undefined", "JULIA_LOAD_PATH=C:\\Users\\INIT\\.julia\\environments\\v1.11\\Project.toml;C:\\Users\\INIT\\.julia\\juliaup\\julia-1.11.6+0.x64.w64.mingw32\\share\\julia\\stdlib\\v1.11", "SYSTEMDRIVE=C:", "__COMPAT_LAYER=DetectorsAppHealth", "PROCESSOR_ARCHITECTURE=AMD64", "OPENBLAS_MAIN_FREE=1"]), ProcessExited(1)) [1]
> 
> Stacktrace:
> [1] pipeline_error
> @ .\process.jl:598 [inlined]
> [2] run(::Cmd; wait::Bool)
> @ Base .\process.jl:513
> [3] run(::Cmd)
> @ Base .\process.jl:510
> [4] _run(io::IO, cmd::Cmd, args::Any; flags::Any)
> @ CondaPkg C:\Users\INIT\.julia\packages\CondaPkg\JnPvc\src\resolve.jl:761
> [5] _run(io::IO, cmd::Cmd, args::Any)
> @ CondaPkg C:\Users\INIT\.julia\packages\CondaPkg\JnPvc\src\resolve.jl:755
> [6] (::CondaPkg.var"#72#81"{Bool, IOContext{Base.PipeEndpoint}, String, Vector{CondaPkg.PipPkgSpec}, Vector{CondaPkg.PkgSpec}, Vector{CondaPkg.ChannelSpec}})()
> @ CondaPkg C:\Users\INIT\.julia\packages\CondaPkg\JnPvc\src\resolve.jl:1053
> [7] cd(f::CondaPkg.var"#72#81"{Bool, IOContext{Base.PipeEndpoint}, String, Vector{CondaPkg.PipPkgSpec}, Vector{CondaPkg.PkgSpec}, Vector{CondaPkg.ChannelSpec}}, dir::String)
> @ Base.Filesystem .\file.jl:101
> [8] resolve(; force::Bool, io::IO, interactive::Bool, dry_run::Bool)
> @ CondaPkg C:\Users\INIT\.julia\packages\CondaPkg\JnPvc\src\resolve.jl:986
> [9] resolve()
> @ CondaPkg C:\Users\INIT\.julia\packages\CondaPkg\JnPvc\src\resolve.jl:764
> [10] envdir()
> @ CondaPkg C:\Users\INIT\.julia\packages\CondaPkg\JnPvc\src\env.jl:70
> [11] init_context()
> @ PythonCall.C C:\Users\INIT\.julia\packages\PythonCall\IOKTD\src\C\context.jl:63
> [12] __init__ ()
> @ PythonCall.C C:\Users\INIT\.julia\packages\PythonCall\IOKTD\src\C\C.jl:26
> [13] run_module_init(mod::Module, i::Int64)
> @ Base .\loading.jl:1378
> [14] register_restored_modules(sv::Core.SimpleVector, pkg::Base.PkgId, path::String)
> @ Base .\loading.jl:1366
> [15] _include_from_serialized(pkg::Base.PkgId, path::String, ocachepath::String, depmods::Vector{Any}, ignore_native::Nothing; register::Bool)
> @ Base .\loading.jl:1254
> [16] _include_from_serialized (repeats 2 times)
> @ .\loading.jl:1210 [inlined]
> [17] _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:2057
> [18] _require(pkg::Base.PkgId, env::String)
> @ Base .\loading.jl:2527
> [19] __require_prelocked(uuidkey::Base.PkgId, env::String)
> @ Base .\loading.jl:2388
> [20] #invoke_in_world#3
> @ .\essentials.jl:1089 [inlined]
> [21] invoke_in_world
> @ .\essentials.jl:1086 [inlined]
> [22] _require_prelocked(uuidkey::Base.PkgId, env::String)
> @ Base .\loading.jl:2375
> [23] macro expansion
> @ .\loading.jl:2314 [inlined]
> [24] macro expansion
> @ .\lock.jl:273 [inlined]
> [25] __require(into::Module, mod::Symbol)
> @ Base .\loading.jl:2271
> [26] #invoke_in_world#3
> @ .\essentials.jl:1089 [inlined]
> [27] invoke_in_world
> @ .\essentials.jl:1086 [inlined]
> [28] require(into::Module, mod::Symbol)
> @ Base .\loading.jl:2260
> [29] include
> @ .\Base.jl:562 [inlined]
> [30] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::Nothing)      
> @ Base .\loading.jl:2881
> [31] top-level scope
> @ stdin:6
> during initialization of module C
> in expression starting at C:\Users\INIT\.julia\packages\OptimizationSciPy\0QVwM\src\OptimizationSciPy.jl:2     
> in expression starting at stdin:
> 
> ```

I cannot run anything that requires admin rights (“This program is blocked by group policy…” (?) and so far it has not been an issue). So any advise other than that would be appreciated 🙂

Thank you.

---

<div class="post-metadata">

**Author:** ![opsssi](https://avatars.discourse-cdn.com/v4/letter/o/5fc32e/32.png) [@opsssi](https://discourse.julialang.org/u/opsssi)\
**Post date:** [September 14, 2025, 5:21pm UTC](https://discourse.julialang.org/t/error-when-precompiling-packages-that-rely-on-pythoncall/132371/2 "2025-09-14T17:21:36Z")

</div>

Update: I got rid of this issue now.  
If anyone else has this problem, I solved it in the following way (probably not the best way but it worked 😃 )

I don’t know if all of these steps are actually necessary but here we go:

1. Since the error message suggested some issue with the pixi backend of CondaPkg (see [JuliaPy/CondaPkg.jl: Add Conda dependencies to your Julia project](https://github.com/JuliaPy/CondaPkg.jl)), I switched the backend to MicroMamba:

```julia-auto
]add PreferenceTools
]add MicroMamba
using PreferenceTools
]preference add CondaPkg backend=MicroMamba

```

1. After restarting julia, it still seemed to use the pixi backend for some reason and the error persisted. I then tried the brute force way of removing Conda completely, deleting both, the directory  
C:\Users\INIT.julia\environments\v1.11.CondaPkg  
and C:\Users\INIT.julia\conda and running

```julia-auto
]rm Conda
]rm CondaPkg
]add CondaPkg

```

After this, I was able to successfully use the OptimizationSciPy package.

---

<div class="post-metadata">

**Author:** ![Benny](https://avatars.discourse-cdn.com/v4/letter/b/49beb7/32.png) [@Benny](https://discourse.julialang.org/u/Benny)\
**Post date:** [September 14, 2025, 5:24pm UTC](https://discourse.julialang.org/t/error-when-precompiling-packages-that-rely-on-pythoncall/132371/3 "2025-09-14T17:24:23Z")

</div>

`PyCall` is an unrelated package and not in any of your error messages. Change your title and tags to `PythonCall`, that’s the actual dependency and should be stated to draw the right attention to the `pixi` backend issue. You should keep the `]build PyCall` step and acknowledge it was a mistake, it could have affected the process.

---

<div class="post-metadata">

**Author:** ![cjdoris](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cjdoris/32/213133_2.png) [@cjdoris](https://discourse.julialang.org/u/cjdoris)\
**Post date:** [September 14, 2025, 9:36pm UTC](https://discourse.julialang.org/t/error-when-precompiling-packages-that-rely-on-pythoncall/132371/4 "2025-09-14T21:36:02Z")

</div>

No idea what the underlying issue was but I’m guessing something in the `.CondaPkg` folder got corrupted somehow.

Deleting `.CondaPkg` is fine provided Julia is not running, it will be recreated next time you use PythonCall.
