I try to check if torch have been properly installed by script:
import torch
print(torch.__version__)
and have the result: AttributeError: module 'torch' has no attribute ' version '
I've checked if torch is installed in my venv by:
pip freeze
and it is installed(I tried to install as via conda as via pip as suggested at https://pytorch.org/ ):
Environment:
Do not understand what's the problem
Pytorch has a sub-module called version and from that you can say,
torch.version.__version__
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.