python安装dlib要cmake,如何使用cmake解决dlib错误?

用户在尝试使用pip安装dlib和facerecognition库时遇到错误,问题出在CMake的配置上。尽管已安装了cmake,但pip安装过程中无法找到合适的C编译器,导致dlib的编译失败。解决方案可能涉及确保系统路径中包含了正确的编译器路径,或者手动下载并配置dlib库。
摘要由CSDN通过智能技术生成

ı已经安装了cmake,当ıtype pip安装cmake时,它说它已经在那里了。但是当写pip安装dlib或facerecognition时会出错ERROR: Complete output from command 'C:\Users\giris\AppData\Local\Programs\Python\Python37-32\python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\\Users\\giris\\AppData\\Local\\Temp\\pip-install-5bdpmey0\\dlib\\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\giris\AppData\Local\Temp\pip-record-p5f_jmbr\install-record.txt' --single-version-externally-managed --compile:

ERROR: running install

running build

running build_py

package init file 'dlib\__init__.py' not found (or not a regular file)

running build_ext

Building extension for Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 21:26:53) [MSC v.1916 32 bit (Intel)]

Invoking CMake setup: 'cmake C:\Users\giris\AppData\Local\Temp\pip-install-5bdpmey0\dlib\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\giris\AppData\Local\Temp\pip-install-5bdpmey0\dlib\build\lib.win32-3.7 -DPYTHON_EXECUTABLE=C:\Users\giris\AppData\Local\Programs\Python\Python37-32\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\giris\AppData\Local\Temp\pip-install-5bdpmey0\dlib\build\lib.win32-3.7'

-- Building for: NMake Makefiles

-- The C compiler identification is unknown

-- The CXX compiler identification is unknown

CMake Error in CMakeLists.txt:

The CMAKE_C_COMPILER:

cl

is not a full path and was not found in the PATH.

To use the NMake generator with Visual C++, cmake must be run from a shell

that can use the compiler cl from the command line. This environment is

unable to invoke the cl compiler. To fix this problem, run cmake from

每次我得到这个错误是怎么回事[![在此处输入图像说明][1]][1]

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值