detect ModuleNotFoundError in pyimport
Aperta
enhancement
- Lingua principale
- Julia
- Stelle
- 1.5k
- Fork
- 186
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
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?
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.