Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/278.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 尝试在Windows上生成自定义系统映像时出错_Python_Julia - Fatal编程技术网

Python 尝试在Windows上生成自定义系统映像时出错

Python 尝试在Windows上生成自定义系统映像时出错,python,julia,Python,Julia,我想构建一个定制的julia.dll,以加速从python包装器调用的一些定制julia代码的初始化。我按照本页上的说明:运行命令 python -m julia.sysimage sys.dll 但是我得到了这个错误 Activating new environment at `C:\Users\KENNET~2\AppData\Local\Temp\tmp.pyjulia.sysimage.ns0yrrt6\compiler_env\Project.toml` [ Info: Instal

我想构建一个定制的julia.dll,以加速从python包装器调用的一些定制julia代码的初始化。我按照本页上的说明:运行命令

python -m julia.sysimage sys.dll
但是我得到了这个错误

Activating new environment at `C:\Users\KENNET~2\AppData\Local\Temp\tmp.pyjulia.sysimage.ns0yrrt6\compiler_env\Project.toml`
[ Info: Installing PackageCompiler...
   Updating registry at `C:\Users\kenneth39080\.julia\registries\General`
  Resolving package versions...
Updating `C:\Users\kenneth39080\AppData\Local\Temp\tmp.pyjulia.sysimage.ns0yrrt6\compiler_env\Project.toml`
  [9b87118b] + PackageCompiler v1.2.4
Updating `C:\Users\kenneth39080\AppData\Local\Temp\tmp.pyjulia.sysimage.ns0yrrt6\compiler_env\Manifest.toml`
  [9b87118b] + PackageCompiler v1.2.4
  [2a0f44e3] + Base64
  [ade2ca70] + Dates
  [b77e0a4c] + InteractiveUtils
  [76f85450] + LibGit2
  [8f399da3] + Libdl
  [56ddb016] + Logging
  [d6f4376e] + Markdown
  [44cfe95a] + Pkg
  [de0858da] + Printf
  [3fa0cd96] + REPL
  [9a3f8284] + Random
  [ea8e919c] + SHA
  [9e88b42a] + Serialization
  [6462fe0b] + Sockets
  [cf7118a7] + UUIDs
  [4ec0a83e] + Unicode
┌ Error: build.log for PackageCompiler [9b87118b-4619-50d2-8e1e-99f35a4d4d9d] not found
└ @ Main C:\Users\kenneth39080\Miniconda3\Lib\site-packages\julia\install-packagecompiler.jl:19
[ Info: Loading PackageCompiler...
[ Info: PackageCompiler is successfully installed at C:\Users\KENNET~2\AppData\Local\Temp\tmp.pyjulia.sysimage.ns0yrrt6\compiler_env
 Activating environment at `C:\Users\KENNET~2\AppData\Local\Temp\tmp.pyjulia.sysimage.ns0yrrt6\compiler_env\Project.toml`
[ Info: Loading PackageCompiler...
[ Info: Installing PyCall...
 Activating new environment at `C:\Users\KENNET~2\AppData\Local\Temp\tmp.pyjulia.sysimage.ns0yrrt6\Project.toml`
   Updating registry at `C:\Users\kenneth39080\.julia\registries\General`
  Resolving package versions...
Updating `C:\Users\kenneth39080\AppData\Local\Temp\tmp.pyjulia.sysimage.ns0yrrt6\Project.toml`
  [438e738f] + PyCall v1.92.1
Updating `C:\Users\kenneth39080\AppData\Local\Temp\tmp.pyjulia.sysimage.ns0yrrt6\Manifest.toml`
  [8f4d0f93] + Conda v1.5.0
  [682c06a0] + JSON v0.21.1
  [1914dd2f] + MacroTools v0.5.6
  [69de0a69] + Parsers v1.0.15
  [438e738f] + PyCall v1.92.1
  [81def892] + VersionParsing v1.2.0
  [2a0f44e3] + Base64
  [ade2ca70] + Dates
  [8f399da3] + Libdl
  [37e2e46d] + LinearAlgebra
  [d6f4376e] + Markdown
  [a63ad114] + Mmap
  [de0858da] + Printf
  [9a3f8284] + Random
  [9e88b42a] + Serialization
  [4ec0a83e] + Unicode
[ Info: Compiling a temporary system image without `PyCall`...
[ Info: PackageCompiler: creating system image object file, this might take a while...
Traceback (most recent call last):
  File "c:\users\kenneth39080\miniconda3\lib\runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "c:\users\kenneth39080\miniconda3\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "c:\users\kenneth39080\miniconda3\Scripts\julia-py.exe\__main__.py", line 7, in <module>
  File "c:\users\kenneth39080\miniconda3\lib\site-packages\julia\julia_py.py", line 151, in main
    julia_py(**vars(parse_args(args, **kwargs)))
  File "c:\users\kenneth39080\miniconda3\lib\site-packages\julia\julia_py.py", line 74, in julia_py
    api.jl_atexit_hook(code)
OSError: exception: stack overflow
ERROR: LoadError: failed process: Process(`'c:\users\kenneth39080\miniconda3\Scripts\julia-py.exe' --color=yes --startup-file=no --cpu-target=native '--sysimage=C:\Users\kenneth39080\AppData\Local\Programs\Julia 1.5.3\lib\julia\sys.dll' --project=. '--output-o=C:\Users\KENNET~2\AppData\Local\Temp\jl_1uL7ce65to.o' -e 'Base.reinit_stdio()
@eval Sys BINDIR = ccall(:jl_get_julia_bindir, Any, ())::String
@eval Sys STDLIB = "C:\\Users\\kenneth39080\\AppData\\Local\\Programs\\Julia 1.5.3\\share\\julia\\stdlib\\v1.5"
Base.init_load_path()
if isdefined(Base, :init_active_project)
    Base.init_active_project()
end
Base.init_depot_path()
# This @eval prevents symbols from being put into Main
@eval Module() begin
    PrecompileStagingArea = Module()
    for (_pkgid, _mod) in Base.loaded_modules
        if !(_pkgid.name in ("Main", "Core", "Base"))
            eval(PrecompileStagingArea, :(const $(Symbol(_mod)) = $_mod))
        end
    end
    precompile_statements = String[]
        append!(precompile_statements, readlines("C:\\Users\\KENNET~2\\AppData\\Local\\Temp\\jl_1gGb5xu3ra"))

    for statement in sort(precompile_statements)
        # println(statement)
        # The compiler has problem caching signatures with \`Vararg{?, N}\`. Replacing
        # N with a large number seems to work around it.
        statement = replace(statement, r"Vararg{(.*?), N} where N" => s"Vararg{\1, 100}")
        try
            Base.include_string(PrecompileStagingArea, statement)
        catch
            # See julia issue #28808
            @debug "failed to execute $statement"
        end
    end
end # module
empty!(LOAD_PATH)
empty!(DEPOT_PATH)
'`, ProcessExited(1)) [1]

Stacktrace:
 [1] pipeline_error at .\process.jl:525 [inlined]
 [2] run(::Cmd; wait::Bool) at .\process.jl:440
 [3] run at .\process.jl:438 [inlined]
 [4] create_sysimg_object_file(::String, ::Array{String,1}; project::String, base_sysimage::String, precompile_execution_file::Array{String,1}, precompile_statements_file::Array{String,1}, cpu_target::String, script::Nothing, isapp::Bool) at C:\Users\kenneth39080\.julia\packages\PackageCompiler\KeZOk\src\PackageCompiler.jl:307
 [5] create_sysimage(::Array{Symbol,1}; sysimage_path::String, project::String, precompile_execution_file::Array{String,1}, precompile_statements_file::Array{String,1}, incremental::Bool, filter_stdlibs::Bool, replace_default::Bool, cpu_target::String, script::Nothing, base_sysimage::Nothing, isapp::Bool) at C:\Users\kenneth39080\.julia\packages\PackageCompiler\KeZOk\src\PackageCompiler.jl:443
 [6] (::var"#1#2")(::String) at C:\Users\kenneth39080\Miniconda3\Lib\site-packages\julia\compile.jl:27
 [7] mktempdir(::var"#1#2", ::String; prefix::String) at .\file.jl:709
 [8] mktempdir(::Function, ::String) at .\file.jl:707 (repeats 2 times)
 [9] top-level scope at C:\Users\kenneth39080\Miniconda3\Lib\site-packages\julia\compile.jl:24
 [10] include(::Function, ::Module, ::String) at .\Base.jl:380
 [11] include(::Module, ::String) at .\Base.jl:368
 [12] exec_options(::Base.JLOptions) at .\client.jl:296
 [13] _start() at .\client.jl:506
 [14] #invokelatest#1 at .\essentials.jl:710 [inlined]
 [15] invokelatest(::Any) at .\essentials.jl:709
 [16] top-level scope at none:1
in expression starting at C:\Users\kenneth39080\Miniconda3\Lib\site-packages\julia\compile.jl:23
Command '['C:\\Users\\kenneth39080\\Miniconda3\\Scripts\\julia-py.exe', '--julia', 'julia', '--compiled-modules=no', '--color=yes', 'C:\\Users\\kenneth39080\\Miniconda3\\Lib\\site-packages\\julia\\compile.jl', 'C:\\Users\\KENNET~2\\AppData\\Local\\Temp\\tmp.pyjulia.sysimage.ns0yrrt6\\compiler_env', 'C:\\Users\\kenneth39080\\Miniconda3\\Lib\\site-packages\\julia\\precompile.jl', 'C:\\Users\\kenneth39080\\sys.dll', '']' returned non-zero exit status 1.
在'C:\Users\KENNET~2\AppData\Local\Temp\tmp.pyjulia.sysimage.ns0yrrt6\compiler\u env\Project.toml激活新环境`
[信息:正在安装PackageCompiler。。。
正在更新注册表,地址为'C:\Users\kenneth39080\.julia\registries\General`
正在解析包版本。。。
正在更新'C:\Users\kenneth39080\AppData\Local\Temp\tmp.pyjulia.sysimage.ns0yrrt6\compiler\u env\Project.toml`
[9b87118b]+PackageCompiler v1.2.4
正在更新'C:\Users\kenneth39080\AppData\Local\Temp\tmp.pyjulia.sysimage.ns0yrrt6\compiler\u env\Manifest.toml`
[9b87118b]+PackageCompiler v1.2.4
[2a0f44e3]+Base64
[ade2ca70]+日期
[b77e0a4c]+交互式EUTILS
[76f85450]+LibGit2
[8f399da3]+Libdl
[56ddb016]+记录
[d6f4376e]+降价
[44cfe95a]+Pkg
[de0858da]+Printf
[3fa0cd96]+回复
[9a3f8284]+随机
[ea8e919c]+SHA
[9e88b42a]+系列化
[64620B]+插座
[cf7118a7]+UUID
[4ec0a83e]+Unicode
┌ 错误:未找到PackageCompiler[9b87118b-4619-50d2-8e1e-99F35A4D9D]的build.log
└ @ 主C:\Users\kenneth39080\Miniconda3\Lib\site packages\julia\install packagecompiler.jl:19
[信息:正在加载PackageCompiler。。。
[信息:PackageCompiler已成功安装在C:\Users\KENNET~2\AppData\Local\Temp\tmp.pyjulia.sysimage.ns0yrrt6\compiler\u env
正在激活以下位置的环境:C:\Users\KENNET~2\AppData\Local\Temp\tmp.pyjulia.sysimage.ns0yrrt6\compiler\u env\Project.toml`
[信息:正在加载PackageCompiler。。。
[信息:正在安装PyCall。。。
正在激活位于以下位置的新环境:C:\Users\KENNET~2\AppData\Local\Temp\tmp.pyjulia.sysimage.ns0yrrt6\Project.toml`
正在更新注册表,地址为'C:\Users\kenneth39080\.julia\registries\General`
正在解析包版本。。。
正在更新'C:\Users\kenneth39080\AppData\Local\Temp\tmp.pyjulia.sysimage.ns0yrrt6\Project.toml`
[438e738f]+PyCall v1.92.1
正在更新'C:\Users\kenneth39080\AppData\Local\Temp\tmp.pyjulia.sysimage.ns0yrrt6\Manifest.toml`
[8f4d0f93]+康达v1.5.0
[682c06a0]+JSON v0.21.1
[1914dd2f]+宏工具v0.5.6
[69de0a69]+解析器v1.0.15
[438e738f]+PyCall v1.92.1
[81def892]+版本解析v1.2.0
[2a0f44e3]+Base64
[ade2ca70]+日期
[8f399da3]+Libdl
[37e2e46d]+线性代数
[d6f4376e]+降价
[a63ad114]+Mmap
[de0858da]+Printf
[9a3f8284]+随机
[9e88b42a]+系列化
[4ec0a83e]+Unicode
[信息:编译没有'PyCall'的临时系统映像。。。
[信息:PackageCompiler:正在创建系统映像对象文件,这可能需要一些时间。。。
回溯(最近一次呼叫最后一次):
文件“c:\users\kenneth39080\miniconda3\lib\runpy.py”,第194行,位于作为主模块的运行模块中
返回运行代码(代码、主全局、无、,
文件“c:\users\kenneth39080\miniconda3\lib\runpy.py”,第87行,在运行代码中
exec(代码、运行\全局)
文件“c:\users\kenneth39080\miniconda3\Scripts\julia py.exe\ \uuuuu main\uuuuuuu.py”,第7行,在
文件“c:\users\kenneth39080\miniconda3\lib\site packages\julia\julia\u py.py”,第151行,主目录
julia_py(**vars(parse_args(args,**kwargs)))
文件“c:\users\kenneth39080\miniconda3\lib\site packages\julia\julia\u py.py”,第74行,julia\u py
api.jl_atexit_hook(代码)
操作错误:异常:堆栈溢出
错误:LoadError:失败的进程:进程(`c:\users\kenneth39080\miniconda3\Scripts\julia py.exe'-color=yes--startup file=no--cpu target=native'-sysimage=c:\users\kenneth39080\AppData\Local\Programs\julia 1.5.3\lib\julia\sys.dll'-project=.'-output-o=c:\users\KENNET~2\AppData\Local\Temp\jl\jl\jl\u1ul7ce65to.o'-e'Base.reinit\stdio()
@eval Sys BINDIR=ccall(:jl_get_julia_BINDIR,Any,())::String
@eval Sys STDLIB=“C:\\Users\\kenneth39080\\AppData\\Local\\Programs\\Julia 1.5.3\\share\\Julia\\STDLIB\\v1.5”
Base.init_load_path()
如果已定义(基本,:init\u active\u项目)
Base.init\u active\u项目()
结束
Base.init_depot_路径()
#此@eval可防止将符号放入主目录中
@求值模块()开始
预编译tagingarea=模块()
对于Base.loaded_模块中的(_pkgid,_mod)
if!(_pkgid.name in(“Main”、“Core”、“Base”))
eval(预编译tagingarea,:(const$(Symbol(_mod))=$_mod))
结束
结束
预编译_语句=字符串[]
append!(预编译_语句,读取行(“C:\\Users\\KENNET~2\\AppData\\Local\\Temp\\jl\u 1gGb5xu3ra”))
for sort语句(预编译_语句)
#println(声明)
#编译器在缓存带有\`Vararg{?,N}`的签名时出现问题。正在替换
#N与一个大的数字似乎是围绕它工作。
语句=replace(语句,r“Vararg{(.*),N},其中N”=>s“Vararg{\1100}”)
尝试
基本.include_字符串(预编译tagingarea,语句)
抓住
#见《朱莉娅》第28808期
@调试“未能执行$statement”
结束
结束
结束#模块
空!(加载路径)
空!(车辆段路径)
“`,ProcessExited(1))[1]
堆栈跟踪:
[1] 管道\u错误位于。\process.jl:525[内联]
[2] 运行(::Cmd;wait::Bool)于。\process.jl:440
[3] 运行于。\process.jl:438[内联]
[4] 在C:\Users\kenneth39080\.julia\PackageCompiler\KeZOk\src\PackageCompiler.jl:307创建\u sysimg\u object\u文件(::String,::Array{String,1};project::String,base\u sysimage::String,precompile\u execution\u file::Array{String,1};project::String::String,base\sysimage::Nothing,isapp::Bool)
[5] 创建系统映像(::数组{Symbol,1};系统映像{path::String,project::String,precompile\u execution\u file::Array{String,1},precompile\u statements\u file::Array{String,1},incremental::Bool,filter\u stdlibs::Bool,replace\u default::Bool,cpu\u target::String,script::Nothing,base\u系统映像::Nothing,isapp::Bool)位于C:\Users\kenneth39080\.julia\packages\PackageCompiler\KeZOk\src\Packa