Importing local Python module fails in Julia 1.4?
- 主要言語
- Julia
- スター
- 1.5k
- フォーク
- 186
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
Hi, I have the following code
```julia
using PyCall
pushfirst!(PyVector(pyimport("sys")."path"), srcdir())
pypsd = pyimport("PSD")
```
`srcdir()` is a *directory* that points to a *folder* which includes a *file* `PSD.jl`.I was using this code about 3 months ago and it worked fine for me.
Unfortunately it doesn't work anymore, even though there was absolutely nothing changed in my source code:
```
ERROR: LoadError: PyCall.PyError("PyImport_ImportModule\n\nThe Python package PSD could not be found by pyimport. Usually this means\nthat you did not install PSD in the Python version being u...
```
The only difference with the past I can think of is that I'm now using a more recent Julia version, 1.4. Has the way of including local modules changed? I've looked at the readme, but I only found a note that PyCall.jl doesn't include current directory by default, but this is not my case.
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
Julia 1.4 で、示されている `PyCall`、`pyimport("sys")`、`sys.path`、`srcdir()`、`PSD` の手順で失敗を再現してください。まず、ローカルディレクトリと `PSD` モジュールが Python にどのように公開されているかを確認し、その後、以前動作していたセットアップと挙動を比較してください。ローカルの `PSD` モジュールを正常にインポートできるか、必要なセットアップで問題が明確になれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- backend
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100