build pycall 报错,谁能给看下怎么解决?

想用julia读写xls格式文件,得知要安装ExcelReaders.jlExcelFiles.jl等包。而这些包依赖本地Python库。
按照这个链接,进行了安装(其实,jupyter也会给报错和配置提示),结果报错。
看到论坛里,之前有关于这方面的讨论,但情况跟我的好像不完全相同。

有懂的朋友,还请帮看下下面的报错提示。
谢谢了,朋友们。

(最近,遇到的各类Julia方面的问题不少 :smiling_face_with_tear:。)

julia> ENV["PYTHON"]="/home/wangxl/.conda/envs/py368/bin/python3"
"/home/wangxl/.conda/envs/py368/bin/python3"

julia> Pkg.build("PyCall")
    Building Conda ─→ `~/.julia/scratchspaces/44cfe95a-1eb2-52ea-b672-e2afdf69b78f/6cdc8832ba11c7695f494c9d9a1c31e90959ce0f/build.log`
    Building PyCall → `~/.julia/scratchspaces/44cfe95a-1eb2-52ea-b672-e2afdf69b78f/71fd4022ecd0c6d20180e23ff1b3e05a143959c2/build.log`
Precompiling project...
  ✗ ExcelReaders
  ✗ ExcelFiles
  1 dependency successfully precompiled in 6 seconds (100 already precompiled)
  2 dependencies errored. To see a full report either run `import Pkg; Pkg.precompile()` or load the packages

julia> Pkg.precompile()
Precompiling project...
  ✗ ExcelFiles
  0 dependencies successfully precompiled in 2 seconds (102 already precompiled)

ERROR: The following 1 direct dependency failed to precompile:

ExcelFiles [89b67f3b-d1aa-5f6f-9ca4-282e8d98620d]

Failed to precompile ExcelFiles [89b67f3b-d1aa-5f6f-9ca4-282e8d98620d] to /home/wangxl/.julia/compiled/v1.7/ExcelFiles/jl_h7Ivhk.

signal (6): Aborted
in expression starting at /home/wangxl/.julia/packages/ExcelFiles/NtqPa/src/ExcelFiles.jl:4
gsignal at /usr/bin/../lib/libc.so.6 (unknown line)
abort at /usr/bin/../lib/libc.so.6 (unknown line)
unknown function (ip: 0x7faaf7992061)
warning: unknown data in line table prologue at offset 0x00000000: parsing ended (at offset 0x000001eb) before reaching the prologue end at offset 0x000004a1
CThunkObject_dealloc at (null):0
free_keys_object.lto_priv.1712 at /home/wangxl/.conda/envs/py368/lib/libpython3.6m.so.1.0 (unknown line)
dict_dealloc.lto_priv.378 at /home/wangxl/.conda/envs/py368/lib/libpython3.6m.so.1.0 (unknown line)
PyCData_clear at (null):0 [inlined]
PyCFuncPtr_clear at (null):4030 [inlined]
PyCFuncPtr_dealloc at (null):4036
subtype_dealloc.lto_priv.1689 at /home/wangxl/.conda/envs/py368/lib/libpython3.6m.so.1.0 (unknown line)
_PyEval_EvalFrameDefault at /home/wangxl/.conda/envs/py368/lib/libpython3.6m.so.1.0 (unknown line)
_PyFunction_FastCall at /home/wangxl/.conda/envs/py368/lib/libpython3.6m.so.1.0 (unknown line)
call_function.lto_priv.1480 at /home/wangxl/.conda/envs/py368/lib/libpython3.6m.so.1.0 (unknown line)
_PyEval_EvalFrameDefault at /home/wangxl/.conda/envs/py368/lib/libpython3.6m.so.1.0 (unknown line)
_PyEval_EvalCodeWithName at /home/wangxl/.conda/envs/py368/lib/libpython3.6m.so.1.0 (unknown line)
PyEval_EvalCodeEx at /home/wangxl/.conda/envs/py368/lib/libpython3.6m.so.1.0 (unknown line)
PyEval_EvalCode at /home/wangxl/.conda/envs/py368/lib/libpython3.6m.so.1.0 (unknown line)
builtin_exec at /home/wangxl/.conda/envs/py368/lib/libpython3.6m.so.1.0 (unknown line)
PyCFunction_Call at /home/wangxl/.conda/envs/py368/lib/libpython3.6m.so.1.0 (unknown line)
_PyEval_EvalFrameDefault at /home/wangxl/.conda/envs/py368/lib/libpython3.6m.so.1.0 (unknown line)
_PyEval_EvalCodeWithName at /home/wangxl/.conda/envs/py368/lib/libpython3.6m.so.1.0 (unknown line)
call_function.lto_priv.1480 at /home/wangxl/.conda/envs/py368/lib/libpython3.6m.so.1.0 (unknown line)
_PyEval_EvalFrameDefault at /home/wangxl/.conda/envs/py368/lib/libpython3.6m.so.1.0 (unknown line)
_PyFunction_FastCall at /home/wangxl/.conda/envs/py368/lib/libpython3.6m.so.1.0 (unknown line)
call_function.lto_priv.1480 at /home/wangxl/.conda/envs/py368/lib/libpython3.6m.so.1.0 (unknown line)
_PyEval_EvalFrameDefault at /home/wangxl/.conda/envs/py368/lib/libpython3.6m.so.1.0 (unknown line)
_PyFunction_FastCall at /home/wangxl/.conda/envs/py368/lib/libpython3.6m.so.1.0 (unknown line)
call_function.lto_priv.1480 at /home/wangxl/.conda/envs/py368/lib/libpython3.6m.so.1.0 (unknown line)
_PyEval_EvalFrameDefault at /home/wangxl/.conda/envs/py368/lib/libpython3.6m.so.1.0 (unknown line)
_PyFunction_FastCall at /home/wangxl/.conda/envs/py368/lib/libpython3.6m.so.1.0 (unknown line)
call_function.lto_priv.1480 at /home/wangxl/.conda/envs/py368/lib/libpython3.6m.so.1.0 (unknown line)
_PyEval_EvalFrameDefault at /home/wangxl/.conda/envs/py368/lib/libpython3.6m.so.1.0 (unknown line)
_PyFunction_FastCall at /home/wangxl/.conda/envs/py368/lib/libpython3.6m.so.1.0 (unknown line)
_PyFunction_FastCallDict at /home/wangxl/.conda/envs/py368/lib/libpython3.6m.so.1.0 (unknown line)
_PyObject_FastCallDict at /home/wangxl/.conda/envs/py368/lib/libpython3.6m.so.1.0 (unknown line)
_PyObject_CallMethodIdObjArgs at /home/wangxl/.conda/envs/py368/lib/libpython3.6m.so.1.0 (unknown line)
PyImport_ImportModuleLevelObject at /home/wangxl/.conda/envs/py368/lib/libpython3.6m.so.1.0 (unknown line)
builtin___import__ at /home/wangxl/.conda/envs/py368/lib/libpython3.6m.so.1.0 (unknown line)
PyCFunction_Call at /home/wangxl/.conda/envs/py368/lib/libpython3.6m.so.1.0 (unknown line)
PyObject_Call at /home/wangxl/.conda/envs/py368/lib/libpython3.6m.so.1.0 (unknown line)
PyObject_CallFunction at /home/wangxl/.conda/envs/py368/lib/libpython3.6m.so.1.0 (unknown line)
PyImport_Import at /home/wangxl/.conda/envs/py368/lib/libpython3.6m.so.1.0 (unknown line)
PyImport_ImportModule at /home/wangxl/.conda/envs/py368/lib/libpython3.6m.so.1.0 (unknown line)
_pyimport at /home/wangxl/.julia/packages/PyCall/L0fLP/src/PyCall.jl:475
pyimport at /home/wangxl/.julia/packages/PyCall/L0fLP/src/PyCall.jl:499
__init__ at /home/wangxl/.julia/packages/PyCall/L0fLP/src/pyinit.jl:221
unknown function (ip: 0x7faae5f09733)
unknown function (ip: 0x7faafe7cbe86)
jl_init_restored_modules at /usr/bin/../lib/julia/libjulia-internal.so.1 (unknown line)
unknown function (ip: 0x7faae7235ecf)
unknown function (ip: 0x7faae737a867)
unknown function (ip: 0x7faae718a705)
unknown function (ip: 0x7faae7379ee3)
unknown function (ip: 0x7faae72f764d)
unknown function (ip: 0x7faae7401465)
unknown function (ip: 0x7faae7401eee)
unknown function (ip: 0x7faafe7cb8b0)
unknown function (ip: 0x7faafe7cd8f2)
unknown function (ip: 0x7faafe7cd0fa)
unknown function (ip: 0x7faafe7cd476)
jl_toplevel_eval_in at /usr/bin/../lib/julia/libjulia-internal.so.1 (unknown line)
unknown function (ip: 0x7faae7383857)
unknown function (ip: 0x7faae736ffe1)
unknown function (ip: 0x7faae72fc59e)
unknown function (ip: 0x7faae72fc889)
unknown function (ip: 0x7faafe7ae72c)
unknown function (ip: 0x7faafe7adff4)
unknown function (ip: 0x7faafe7aee44)
unknown function (ip: 0x7faafe7afc53)
unknown function (ip: 0x7faafe7cc84f)
jl_toplevel_eval_in at /usr/bin/../lib/julia/libjulia-internal.so.1 (unknown line)
unknown function (ip: 0x7faae6dea647)
unknown function (ip: 0x7faafe7ae72c)
unknown function (ip: 0x7faafe7adff4)
unknown function (ip: 0x7faafe7aee44)
unknown function (ip: 0x7faafe7afc53)
unknown function (ip: 0x7faafe7cc84f)
unknown function (ip: 0x7faafe7cd476)
jl_toplevel_eval_in at /usr/bin/../lib/julia/libjulia-internal.so.1 (unknown line)
unknown function (ip: 0x7faae749930d)
unknown function (ip: 0x7faae6efb152)
unknown function (ip: 0x7faae6efb2a8)
unknown function (ip: 0x7faafe7f42d2)
jl_repl_entrypoint at /usr/bin/../lib/julia/libjulia-internal.so.1 (unknown line)
main at /usr/bin/julia (unknown line)
__libc_start_main at /usr/bin/../lib/libc.so.6 (unknown line)
_start at /usr/bin/julia (unknown line)
Allocations: 621337 (Pool: 620943; Big: 394); GC: 1
Stacktrace:
 [1] top-level scope
   @ REPL[7]:1

自行解决了。
把Python环境设置修改为3.10。
怀疑是对3.6版本支持不好。
旧:

ENV["PYTHON"]="/home/wangxl/.conda/envs/py368/bin/python3"

新:

ENV["PYTHON"]="/home/wangxl/.conda/envs/py310/bin/python3"
1 个赞

特别说明:这条命令是在Julia终端中键入的,而不是Python终端环境。

ENV["PYTHON"]="/home/wangxl/.conda/envs/py310/bin/python3"