我正在尝试为 python 设置 Azure-IoT-Hub SDK。对于 C SDK,它可以很好地编译和构建。但是对于 python,我得到了 BOOST 路径错误和 Cmake 错误。我正在尝试关注此链接 https://github.com/Azure/azure-iot-sdk-python/blob/master/doc/python-devbox-setup.md#windows
我使用 bootstrap.bat 构建 boost_1_66_0 它生成了 b2.exe 文件,运行它后我在 C:\boost_1_66_0\stage\lib 中得到了二进制文件
我从https://cmake.org/download/下载了 cmake,并通过 C:\cmake-3.15.0-rc3-win64-x64\bin 到环境变量路径。但是在 VS2017 的 devloper 命令提示符中运行 cmake .. -G "Visual Studio 15 2017" 命令时,它显示错误..
C:\azure-iot-sdk-python\cmake>cmake .. -G "Visual Studio 15 2017"
-- The C compiler identification is MSVC 19.16.27032.1
-- The CXX compiler identification is MSVC 19.16.27032.1
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Warning (dev) at CMakeLists.txt:7 (set):
implicitly converting 'build_python' to 'STRING' type.
This warning is for project developers. Use -Wno-dev to suppress it.
-- IoT Client SDK Version = 1.2.12
-- Looking for include file stdint.h
-- Looking for include file stdint.h - found
-- Looking for include file stdbool.h
-- Looking for include file stdbool.h - found
-- target architecture: x86
-- Performing Test CXX_FLAG_CXX11
-- Performing Test CXX_FLAG_CXX11 - Success
-- target architecture: x86
-- target architecture: x86
-- target architecture: x86
-- target architecture: x86
-- iothub architecture: x86
CMake Error at C:/cmake-3.15.0-rc3-win64-x64/share/cmake-3.15/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find Boost (missing: python) (found version "1.67.0")
Call Stack (most recent call first):
C:/cmake-3.15.0-rc3-win64-x64/share/cmake-3.15/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
C:/cmake-3.15.0-rc3-win64-x64/share/cmake-3.15/Modules/FindBoost.cmake:2142 (find_package_handle_standard_args)
device/iothub_client_python/CMakeLists.txt:28 (find_package)
-- Configuring incomplete, errors occurred!
See also "C:/azure-iot-sdk-python/cmake/CMakeFiles/CMakeOutput.log".
See also "C:/azure-iot-sdk-python/cmake/CMakeFiles/CMakeError.log".
这是路径问题吗?请帮助设置环境。我期待 .pyd 文件位于 device/samples 文件夹中。如何解决这个问题?