AlexeyAB / darknet

YOLOv4 / Scaled-YOLOv4 / YOLO - Neural Networks for Object Detection (Windows and Linux version of Darknet )
http://pjreddie.com/darknet/
Other
21.63k stars 7.95k forks source link

Python 3.8 issues with yolo_cpp_dll.dll #4956

Open Greta-A opened 4 years ago

Greta-A commented 4 years ago

Since Python 3.8 updated their process on locating dll's, the darknet.py and darknet_video.py files give the error: "FileNotFoundError: Could not find module 'yolo_cpp_dll.dll' (or any of its dependencies)". I made sure that the dll is in darknet/build/darknet/x64 and it built successfully, the os just can't locate it.

How would I fix darknet.py to remedy this?

Using: Windows 10 OpenCV 4.2.0 Python 3.8 VS 2017

linghhz commented 4 years ago

I had the same problem. yolo_cpp_dll.dl was successfully built in Darknet / build / Darknet / x64. darknet.py gives the error: filenotfounderror: could not find module 'yolo_cpp_dll.dll' (or any of its dependencies). I try to change other dll file's name as "yolo_cpp_dll.dll", and python can locate the file, but give the error: AttributeError: function 'network_width' not found. I also change the file name of "yolo_cpp_dll_no_gpu.dll" to " yolo_cpp_dll.dll". It works, but very slow with CPU. So I suspected CUDA and cudnn, and replaced CUDA 10.0 with CUDA 8.0, but the same problem still occurred. Using: Windows 10 OpenCV 3.4.0 Python 3.8 VS 2015 CUDA 8.0

sca33 commented 4 years ago

Confirming. Rolling back to 3.7 solves the issue. darknet.exe app compiled and works perfect. darknet.py in Python3.8 venv fails with "FileNotFoundError: Could not find module 'yolo_cpp_dll.dll' (or any of its dependencies)"

evmcheb commented 4 years ago

@sca33 Thanks for this. I had the same issue and downgrading to 3.7 works.

heator commented 3 years ago

When I used python3.8,I had the same problems. It works well with python3.7.

parthbs commented 3 years ago

Any update on the resolution of this issue?

rares-foica commented 3 years ago

The newer python scripts using 'darknet.dll' seem to have the same problem. A possible solution is suggested here: https://stackoverflow.com/questions/66218956/import-darknet-filenotfounderror-could-not-find-module