我无法在Windows上找到任何有关安装Darknet和Lightnet的好教程。但是,按照其官方Git页面上的教程,我尝试运行Python命令
pip install darknetpy
运行此操作时,我看到以下错误:
Failed building wheel for darknetpy
Running setup.py clean for darknetpy
Failed to build darknetpy
Installing collected packages: darknetpy
Running setup.py install for darknetpy ... error
Complete output from command c:\users\pop\appdata\local\programs\python\python36\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Pop\\AppData\\Local\\Temp\\pip-build-aew1mvz2\\darknetpy\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\Pop\AppData\Local\Temp\pip-hj4a3ywj-record\install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_ext
'make' is not recognized as an internal or external command,
operable program or batch file.
error: [WinError 2] The system cannot find the file specified: 'C:\\Users\\Pop\\AppData\\Local\\Temp\\darknet\\libdarknet.so'
----------------------------------------
Command "c:\users\pop\appdata\local\programs\python\python36\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Pop\\AppData\\Local\\Temp\\pip-build-aew1mvz2\\darknetpy\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\Pop\AppData\Local\Temp\pip-hj4a3ywj-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\Pop\AppData\Local\Temp\pip-build-aew1mvz2\darknetpy\
答案 0 :(得分:1)
即使使用Cygwin(64),问题darknetpy issue 1也表明它无法在Windows上运行。
最好的选择是(在Windows上):
lindt/docker-darknet
(带docker-for-windows,它将通过HyperV使用小型Linux VM)答案 1 :(得分:0)