Issue
On my machine i can't "pip install torch" - i get infamous "single source externally managed error" - i could not fix it and used "conda install torch" from anaconda.
Still, checking version is easy - torch.__version__
But how to see where is it installed -the home dir of torch? Suppose if I had had both torches installed via pip and conda - how to know which one is used in a project?
import torch
print(torch__version__)
Solution
You can get torch module location which is imported in your script
import torch
print(torch.__file__)
Answered By - Grigor Poghosyan
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.