如何修复CMakeLists.txt中的CMake错误:生成器NMake Makefile不支持平台规范,但是指定了平台x64
我想使用 pip 在Windows 10中使用cmd 安装dlib ,但它显示以下三个错误:CMake CMakeLists.txt中的错误:生成器
NMake Makefiles
does not support platform specification, but platform
x64
was specified.
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
信息:来自d:\ python36 \ lib \ site-packages(python 3.6)pip 9.0.1 cmake 0.9.0
Windows 10 Pro(64位)版本:10.0.16299 Build 16299
-
我在Windows 10,python 3.5,pip 10上,
即使安装了cmake ,dlib也无法正常工作。解决方案:- 将cmake添加到PATH(C:\ Program Files \ CMake \ bin)
- 然后使用安装
pip
:pip install dlib==19.4
奇迹般有效。
编辑:
Windows October更新后,上述方法有效,但有时会出现诸如
boost error
和的错误cmake incompatible
。所以,- 下载并安装CMake MSI
- 将cmake添加到PATH(C:\ Program Files \ CMake \ bin)
- 重新启动Windows
- pip install dlib
要么
pip install dlib==19.4