Open
Description
FWIW, I noticed that I had two torch directories under /usr/local/lib/python3.10/dist-packages
:
torch-1.13.1+cu116.dist-info (the installed version)
torch-1.12.1+cu116.dist-info (containing only an empty file REQUESTED)
importlib_metadata.version("torch")
was retuning None
in this scenario. I think it was looking at the directory which only had the REQUESTED file.
After I removed that torch-1.12.1+cu116.dist-info
directory, it fixed the problem, i.e. now: importlib_metadata.version("torch") == '1.13.1+cu116'
Originally posted by @sswam in #91216 (comment)