Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds package and requirement spec output to version check exception (h…
…uggingface#18702) * Adds package and requirement spec output to version check exception It's difficult to understand what package is affected when `got_ver` here comes back None, so output the requirement and the package. The requirement probably contains the package but let's output both for good measure. Non-exhaustive references for this problem aside from my own encounter: * https://stackoverflow.com/questions/70151167/valueerror-got-ver-is-none-when-importing-tensorflow * https://discuss.huggingface.co/t/valueerror-got-ver-is-none/17465 * UKPLab/sentence-transformers#1186 * huggingface#13356 I speculate that the root of the error comes from a conflict of conda-managed and pip-managed Python packages but I've not yet proven this. * Combines version presence check and streamlines exception message See also: huggingface#18702 (comment) Co-authored-by: Stas Bekman <stas@stason.org>
- Loading branch information