detect ModuleNotFoundError in pyimport
Open
enhancement
- Dominant language
- Julia
- Stars
- 1.5k
- Forks
- 186
- PR merge metrics
- No merged PRs in 30d
Description
Currently, we print `The Python package foo could not be found by pyimport` when [*any* ImportError](https://github.com/JuliaPy/PyCall.jl/blob/master/src/PyCall.jl#L490) is thrown by `pyimport`. We should only print this on a `ModuleNotFoundError`, as otherwise it is misleading.
Note that we can only do this in Python ≥ 3.6 (https://github.com/python/cpython/commit/c943265ba56e7ce7e2fe79fdecfc6670e10e5467). I guess in earlier versions we could check for `"No module named"` in the `ImportError` string?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.