Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Loading Julia packages (using) fails: (julia.core.JuliaError: Exception 'InitError: could not load library...')

Đang mở
#553 3 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
25/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
julia, python
Lĩnh vực
api

Hướng nghiên cứu

Tái hiện lỗi trên Windows với Python 3.8, Julia 1.10 và phiên bản Pyjulia mới nhất, bắt đầu trong julia/core.py quanh các dòng được báo cáo 561, 615, 633 và 715. So sánh python.exe với python-jl.exe và điều tra các lỗi tải libamd.dll và libcholmod; được xem là hoàn tất khi việc sử dụng Images thành công ngay ở lần thử đầu tiên thông qua python.exe.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

I am using Julia 1.10, python 3.8 and the newest Pyjulia version on Windows.

when trying to import some Julia packages (e.g. Images.jl) an error occurs, trying to import again throws another error. Third import try solves the issue (see code below)
(running python-jl.exe solves the issue but would be nice, to get it running using pyhton.exe)

Maybe there is an issue in the order of loading subpackages?

any ideas how to circumvent the first two errors?

Python 3.8.10 (tags/v3.8.10:3d8993a, May  3 2021, 11:48:03) [MSC v.1928 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import julia
>>> jl = julia.Julia()
>>> jl.eval("using Images")
C:\Users\gerharddorn\AppData\Local\Programs\Python\Python38\lib\site-packages\julia\core.py:715: FutureWarning: Accessing `Julia().<name>` to obtain Julia objects is deprecated.  Use `from julia import Main; Main.<name>` or `jl = Julia(); jl.eval('<name>')`.
  warnings.warn(
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\gerharddorn\AppData\Local\Programs\Python\Python38\lib\site-packages\julia\core.py", line 633, in eval
    ans = self._call(src)
  File "C:\Users\gerharddorn\AppData\Local\Programs\Python\Python38\lib\site-packages\julia\core.py", line 561, in _call
    self.check_exception(src)
  File "C:\Users\gerharddorn\AppData\Local\Programs\Python\Python38\lib\site-packages\julia\core.py", line 615, in check_exception
    raise JuliaError(u'Exception \'{}\' occurred while calling julia code:\n{}'
julia.core.JuliaError: Exception 'InitError: could not load library "libamd.dll"
Das angegebene Modul wurde nicht gefunden. 
during initialization of module SuiteSparse_jll' occurred while calling julia code:
using Images
>>> jl.eval("using Images")
┌ Error: Error during initialization of module CHOLMOD
│   exception =
│    could not load library "libcholmod"
│    �E��☻
│    Stacktrace:
│      [1] dlopen(s::String, flags::UInt32; throw_error::Bool)
│        @ Base.Libc.Libdl .\libdl.jl:117
│      [2] dlopen (repeats 2 times)
│        @ .\libdl.jl:116 [inlined]
│      [3] __init__()
│        @ SparseArrays.CHOLMOD C:\Users\gerharddorn\.julia\juliaup\julia-1.10.0+0.x64.w64.mingw32\share\julia\stdlib\v1.10\SparseArrays\src\solvers\cholmod.jl:181
│      [4] run_module_init(mod::Module, i::Int64)
│        @ Base .\loading.jl:1128
│      [5] register_restored_modules(sv::Core.SimpleVector, pkg::Base.PkgId, path::String)
│        @ Base .\loading.jl:1116
│      [6] _include_from_serialized(pkg::Base.PkgId, path::String, ocachepath::String, depmods::Vector{Any})
│        @ Base .\loading.jl:1061
│      [7] _tryrequire_from_serialized(modkey::Base.PkgId, path::String, ocachepath::String, sourcepath::String, depmods::Vector{Any})
│        @ Base .\loading.jl:1475
│      [8] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String, build_id::UInt128)
│        @ Base .\loading.jl:1568
│      [9] _require(pkg::Base.PkgId, env::String)
│        @ Base .\loading.jl:1932
│     [10] __require_prelocked(uuidkey::Base.PkgId, env::String)
│        @ Base .\loading.jl:1806
│     [11] #invoke_in_world#3
│        @ Base .\essentials.jl:921 [inlined]
│     [12] invoke_in_world
│        @ Base .\essentials.jl:918 [inlined]
│     [13] _require_prelocked(uuidkey::Base.PkgId, env::String)
│        @ Base .\loading.jl:1797
│     [14] macro expansion
│        @ Base .\loading.jl:1784 [inlined]
│     [15] macro expansion
│        @ Base .\lock.jl:267 [inlined]
│     [16] __require(into::Module, mod::Symbol)
│        @ Base .\loading.jl:1747
│     [17] #invoke_in_world#3
│        @ Base .\essentials.jl:921 [inlined]
│     [18] invoke_in_world
│        @ Base .\essentials.jl:918 [inlined]
│     [19] require(into::Module, mod::Symbol)
│        @ Base .\loading.jl:1740
└ @ SparseArrays.CHOLMOD C:\Users\gerharddorn\.julia\juliaup\julia-1.10.0+0.x64.w64.mingw32\share\julia\stdlib\v1.10\SparseArrays\src\solvers\cholmod.jl:241
>>> jl.eval("using Images")
>>> jl.eval("RGB(1,0,0)") 
<PyCall.jlwrap RGB{N0f8}(1.0,0.0,0.0)>
Ngôn ngữ chính
Python
Star
893
Fork
101
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của JuliaPy/pyjulia

Tất cả issue của JuliaPy/pyjulia

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.