Nagendra
Nagendra

Reputation: 17

Importing darknet giving error: name 'DARKNET_FORCE_CPU' is not defined

I have installed AlexeyAB darknet and when importing it through python I am getting this error:

Microsoft Windows [Version 10.0.18363.1256] (c) 2019 Microsoft Corporation. All rights reserved.

D:\Yolov4\darknet\build\darknet\x64>python Python 3.7.7 (tags/v3.7.7:d7c567b08f, Mar 10 2020, 10:41:24) [MSC v.1900 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information.

import darknet

name 'DARKNET_FORCE_CPU' is not defined

Anyone know any solution to it or any work around to it please help!!

Upvotes: 1

Views: 5017

Answers (1)

Alcsaw
Alcsaw

Reputation: 26

I ran into the same issue today and I fixed it by commenting the lines 203 to 208 in build/darknet/x64/darknet.py

https://github.com/AlexeyAB/darknet/blob/0968058b546193d2d2d0ce66de1b4bed36f369d1/build/darknet/x64/darknet.py#L203-L208

Upvotes: 1

Related Questions