JuliaPy / JuliaPy/PyCall.jl

Importing local Python module fails in Julia 1.4?

Offen
#781 5 Kommentare 2 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Julia
Sterne
1.5k
Forks
186
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.