Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

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

オープン
#553 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
25/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
julia, python
領域
api

調査の方向性

Python 3.8、Julia 1.10、最新の Pyjulia バージョンを使って Windows の失敗を再現し、報告されている 561、615、633、715 行付近の julia/core.py から調査を始めてください。python.exe と python-jl.exe を比較し、libamd.dll と libcholmod の読み込みエラーを調査してください。python.exe 経由で Images の使用が初回の試行で成功すれば完了です。

索引モデルが issue の本文から書いたものです。

説明

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)>
主要言語
Python
スター
893
フォーク
101
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

JuliaPy/pyjulia のほかの issue

JuliaPy/pyjulia の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。