Skip to content

PyCall fails to precompile on Julia 1.11 with "permission denied" #1092

Open
@portig

Description

@portig

After adding PyCall to my Julia 1.11 installation on Windows 10, I can build it but it fails to precompile when using it. This has never been a problem for me on Julia 1.10 and older. I am specifying the Python to be used via the PYTHON environment variable. I don't understand why the procedure is trying to access the adminAccount. Here is the resulting output:

~: ENV["PYTHON"]
"C:\Users\myAccount\AppData\Local\Programs\Python\Python313\python.exe"

(@v1.11) pkg> build PyCall
Building Conda ─→ C:\Users\myAccount\.julia\scratchspaces\44cfe95a-1eb2-52ea-b672-e2afdf69b78f\b19db3927f0db4151cb86d073689f2428e524576\build.log
Building PyCall → C:\Users\myAccount\.julia\scratchspaces\44cfe95a-1eb2-52ea-b672-e2afdf69b78f\9816a3826b0ebf49ab4926e2b18842ad8b5c8f04\build.log

~: using PyCall
[ Info: Precompiling PyCall [438e738f-606a-5dbb-bf0a-cddfbfd45ab0]
ERROR: LoadError: IOError: stat("C:\Users\adminAccount"): permission denied (EACCES)
Stacktrace:
[1] uv_error
@ .\libuv.jl:106 [inlined]
[2] stat(path::String)
@ Base.Filesystem .\stat.jl:176
[3] isdir
@ .\stat.jl:494 [inlined]
[4] macro expansion
@ .\loading.jl:655 [inlined]
[5] macro expansion
@ .\lock.jl:273 [inlined]
[6] env_project_file(env::String)
@ Base .\loading.jl:649
[7] implicit_env_project_file_extension
@ .\loading.jl:849 [inlined]
[8] implicit_manifest_deps_get(dir::String, where::Base.PkgId, name::String)
@ Base .\loading.jl:1089
[9] manifest_deps_get(env::String, where::Base.PkgId, name::String)
@ Base .\loading.jl:714
[10] identify_package_env(where::Base.PkgId, name::String)
@ Base .\loading.jl:348
[11] identify_package_env
@ .\loading.jl:334 [inlined]
[12] macro expansion
@ .\loading.jl:2274 [inlined]
[13] macro expansion
@ .\lock.jl:273 [inlined]
[14] __require(into::Module, mod::Symbol)
@ Base .\loading.jl:2271
[15] #invoke_in_world#3
@ .\essentials.jl:1089 [inlined]
[16] invoke_in_world
@ .\essentials.jl:1086 [inlined]
[17] require(into::Module, mod::Symbol)
@ Base .\loading.jl:2260
[18] include
@ .\Base.jl:557 [inlined]
[19] 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
[20] top-level scope
@ stdin:6
in expression starting at C:\Users\myAccount.julia\packages\PyCall\1gn3u\src\PyCall.jl:1
in expression starting at stdin:6
ERROR: Failed to precompile PyCall [438e738f-606a-5dbb-bf0a-cddfbfd45ab0] to "C:\Users\myAccount\.julia\compiled\v1.11\PyCall\jl_6701.tmp".
Stacktrace:
[1] error(s::String)
@ Base .\error.jl:35
[2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO,
keep_loaded_modules::Bool; flags::Cmd, cacheflags::Base.CacheFlags, reasons::Dict{…}, loadable_exts::Nothing)
@ Base .\loading.jl:3174
[3] (::Base.var"#1110#1111"{Base.PkgId})()
@ Base .\loading.jl:2579
[4] mkpidlock(f::Base.var"#1110#1111"{Base.PkgId}, at::String, pid::Int32; kwopts::@kwargs{stale_age::Int64, wait::Bool})
@ FileWatching.Pidfile C:\Users\myAccount\AppData\Local\Programs\Julia-1.11\share\julia\stdlib\v1.11\FileWatching\src\pidfile.jl:95
[5] #mkpidlock#6
@ C:\Users\myAccount\AppData\Local\Programs\Julia-1.11\share\julia\stdlib\v1.11\FileWatching\src\pidfile.jl:90 [inlined]
[6] trymkpidlock(::Function, ::Vararg{Any}; kwargs::@kwargs{stale_age::Int64})
@ FileWatching.Pidfile C:\Users\myAccount\AppData\Local\Programs\Julia-1.11\share\julia\stdlib\v1.11\FileWatching\src\pidfile.jl:116
[7] #invokelatest#2
@ .\essentials.jl:1057 [inlined]
[8] invokelatest
@ .\essentials.jl:1052 [inlined]
[9] maybe_cachefile_lock(f::Base.var"#1110#1111"{Base.PkgId}, pkg::Base.PkgId, srcpath::String; stale_age::Int64)
@ Base .\loading.jl:3698
[10] maybe_cachefile_lock
@ .\loading.jl:3695 [inlined]
[11] _require(pkg::Base.PkgId, env::String)
@ Base .\loading.jl:2565
[12] __require_prelocked(uuidkey::Base.PkgId, env::String)
@ Base .\loading.jl:2388
[13] #invoke_in_world#3
@ .\essentials.jl:1089 [inlined]
[14] invoke_in_world
@ .\essentials.jl:1086 [inlined]
[15] _require_prelocked(uuidkey::Base.PkgId, env::String)
@ Base .\loading.jl:2375
[16] macro expansion
@ .\loading.jl:2314 [inlined]
[17] macro expansion
@ .\lock.jl:273 [inlined]
[18] __require(into::Module, mod::Symbol)
@ Base .\loading.jl:2271
[19] #invoke_in_world#3
@ .\essentials.jl:1089 [inlined]
[20] invoke_in_world
@ .\essentials.jl:1086 [inlined]
[21] require(into::Module, mod::Symbol)
@ Base .\loading.jl:2260
Some type information was truncated. Use show(err) to see complete types.

In the PYTHON environment variable the results are the same whether I include the "\python.exe"

Thanks for your consideration!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions