JuliaPy / JuliaPy/PyCall.jl

Importing local Python module fails in Julia 1.4?

Open
#781 5 comments 2 reactions 0 assignees View on GitHub
Dominant language
Julia
Stars
1.5k
Forks
186
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.