Torch - NotFoundError.
See original GitHub issuenuitka --version
0.6.15rc5
Python: 3.9.2 (tags/v3.9.2:1a79785, Feb 19 2021, 13:44:55) [MSC v.1928 64 bit (AMD64)]
Executable: E:\YoloV5\Scripts\python.exe
OS: Windows
Arch: x86_64
At the moment, the version does not matter, the same error is observed in previous versions.
command: python -m nuitka --mingw64 --standalone --windows-uac-admin --plugin-enable=torch --plugin-enable=multiprocessing --plugin-enable=numpy --output-dir=E:\TEST\TEST\TEST "E:\TEST\detect.py"
code:
from yolov5 import YOLOv5
# set model params
model_path = "yolov5/weights/yolov5s.pt" # it automatically downloads yolov5s model to given path
device = "cuda" # or "cpu"
# init yolov5 model
yolov5 = YOLOv5(model_path, device)
# load images
image1 = 'https://github.com/ultralytics/yolov5/raw/master/data/images/zidane.jpg'
image2 = 'https://github.com/ultralytics/yolov5/blob/master/data/images/bus.jpg'
# perform inference
results = yolov5.predict(image1)
results.show()
Output:
Traceback (most recent call last):
File "E:\TEST\TEST\TEST\detect.dist\detect.py", line 1, in <module>
File "E:\TEST\TEST\TEST\detect.dist\yolov5\__init__.py", line 1, in <module yolov5>
File "E:\TEST\TEST\TEST\detect.dist\yolov5\detect.py", line 10, in <module yolov5.detect>
File "E:\TEST\TEST\TEST\detect.dist\yolov5\models\experimental.py", line 9, in <module yolov5.models.experimental>
File "E:\TEST\TEST\TEST\detect.dist\yolov5\models\common.py", line 12, in <module yolov5.models.common>
File "E:\TEST\TEST\TEST\detect.dist\yolov5\utils\datasets.py", line 22, in <module yolov5.utils.datasets>
File "E:\TEST\TEST\TEST\detect.dist\yolov5\utils\general.py", line 17, in <module yolov5.utils.general>
File "E:\TEST\TEST\TEST\detect.dist\torchvision\__init__.py", line 6, in <module torchvision>
File "E:\TEST\TEST\TEST\detect.dist\torchvision\models\__init__.py", line 12, in <module torchvision.models>
File "E:\TEST\TEST\TEST\detect.dist\torchvision\models\detection\__init__.py", line 1, in <module torchvision.models.detection>
File "E:\TEST\TEST\TEST\detect.dist\torchvision\models\detection\faster_rcnn.py", line 5, in <module torchvision.models.detection.faster_rcnn>
File "E:\TEST\TEST\TEST\detect.dist\torchvision\ops\__init__.py", line 14, in <module torchvision.ops>
File "E:\TEST\TEST\TEST\detect.dist\torchvision\ops\_register_onnx_ops.py", line 42, in _register_custom_op
File "E:\TEST\TEST\TEST\detect.dist\torch\onnx\__init__.py", line 330, in register_custom_op_symbolic
File "E:\TEST\TEST\TEST\detect.dist\torch\onnx\utils.py", line 1163, in register_custom_op_symbolic
File "E:\TEST\TEST\TEST\detect.dist\torch\onnx\symbolic_registry.py", line 17, in <module torch.onnx.symbolic_registry>
File "importlib.py", line 127, in import_module
ModuleNotFoundError: No module named 'torch.onnx.symbolic_opset7'
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (4 by maintainers)
Top Results From Across the Web
No module named "Torch" - python - Stack Overflow
Try to install PyTorch using pip: First create a Conda environment using: conda create -n env_pytorch python=3.6.
Read more >Modulenotfounderror: No module named 'torch' (Fix the error)
Modulenotfounderror: No module named 'torch' error occurs when pytorch ... This is not very straight but one of the ways to solve module...
Read more >Module not found 'torch' - PyTorch Forums
but when i try to import torch: “import torch” and running it i'm getting Module not found error: “torch”. I'm running on Windows...
Read more >No Module Named Torch In Ubuntu Linux - YouTube
Python Import Error Module Not Found Error : No Module Named Torch In Ubuntu Linux.
Read more >TorchVision not found error after successful installation
So, I guess, PyTorch has been successfully installed. I then went on to install the corresponding TorchVision version, i.e. 0.10.0: sudo apt-get ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
None at all, if a tag “delayed” is seen, that’s what it is. Please don’t ask about progress in these cases.
I managed to reproduce this, but I was busy with other things, but I fully intend to address it at some point.