【发布时间】:2017-07-30 08:44:35
【问题描述】:
我正在尝试在安装了 VisualStudio 2015 的 Windows 机器上编译 pybind11。我还安装了 python 3.5.3 64bit 和 cmake 2.8.12。我得到错误:
CMake Error at tools/FindPythonLibsNew.cmake:122 (message):
Python config failure: Python is 64-bit, chosen compiler is 32-bit
Call Stack (most recent call first):
tools/pybind11Tools.cmake:16 (find_package)
CMakeLists.txt:28 (include)
我没有“选择”编译器为 32 位,并且查看 CMakeLists.txt,我没有找到任何地方指定要运行哪个编译器。 那么如何告诉 pybind11/cmake 编译为 64 位?
【问题讨论】:
-
您必须从 VS2015(如果您从那里编译)或从命令行提示符选择您的编译器版本。此外,强烈建议升级您的 cmake 版本。
-
@utopia,我正在从命令行构建,如何“选择”编译器为 64 而不是 32?我需要在 CMakeLists.txt 文件中添加一些内容吗?
标签: visual-studio-2015 cmake pybind11