Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

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

未关闭
#1,092 8 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
45/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
julia, python
领域
tooling

调研方向

在 Windows 10 上使用 Julia 1.11、PyCall 和报告的 PYTHON 值重现该故障,然后检查 src/PyCall.jl 以及所引用的 Conda 和 PyCall 构建日志。确定预编译为何会访问 adminAccount 路径,并验证使用已配置的 Python 可以在没有权限错误的情况下完成预编译。

由索引模型根据 Issue 内容生成。

描述

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!

主要语言
Julia
星标
1.5k
派生
186
PR 合并指标
30 天内没有已合并 PR

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

JuliaPy/PyCall.jl 的其他 Issue

查看 JuliaPy/PyCall.jl 的全部 Issue

相似的 Issue

更多 Julia Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。