【发布时间】:2015-09-19 18:50:59
【问题描述】:
我正在尝试在我的 Windows 8(64 位)笔记本电脑上安装带有 Python 包装器的 libfreenect。我在 Anaconda 2.3.0 中使用 Python 3.4.3。我似乎已经处理了所有依赖项,但是当我尝试在 cmake gui 中配置构建时,我收到以下错误:
Operating system is Windows
Got System Processor AMD64
libfreenect will be installed to C:/Program Files/libfreenect
Headers will be installed to C:/Program Files/libfreenect/include/libfreenect
Libraries will be installed to C:/Program Files/libfreenect/lib
Found libusb-1.0:
- Includes: C:/libusb-win32-bin-1.2.6.0/include
- Libraries: C:/libusb-win32-bin-1.2.6.0/lib/msvc_i64/libusb.lib
Entering C:/libfreenect/src
Returning to C:/libfreenect
Entering C:/libfreenect/examples
Returning to C:/libfreenect
Entering C:/libfreenect/wrappers/c_sync
Returning to C:/libfreenect
Entering C:/libfreenect/wrappers/python
CMake Error at wrappers/python/CMakeLists.txt:35 (install):
install TARGETS given no LIBRARY DESTINATION for module target
"cython_freenect".
Returning to C:/libfreenect
Entering C:/libfreenect/OpenNI2-FreenectDriver
Returning to C:/libfreenect
Configuring incomplete, errors occurred!
See also "C:/libfreenect/build/CMakeFiles/CMakeOutput.log".
我正在按照此处的安装说明进行操作: http://openkinect.org/wiki/Getting_Started#Windows
我正在遵循此处的特定 Python 指令: http://openkinect.org/wiki/Python_Wrapper_Windows
有人对这个 cmake 错误有任何经验吗?目标是能够与我的 Microsoft Kinect 交互。我可以根据需要提供更多信息。
编辑:添加了详细版本的 cmake 配置输出。
【问题讨论】:
-
根据您的输出,您有空的
CMAKE_INSTALL_PREFIX变量(libfreenect will be installed to)。可能,你突然清楚了它的价值。将其值(在 cmake-gui 中)设置为c:/Program Files并重新运行 cmake(Configure按钮)。 -
我只是没有成功。相同的错误,只是它说它将安装到该目录。我注意到 cmakefile 以 Python 版本 2 格式与我当前使用的 3 格式打印。我什至尝试修改这个文件以符合 Python 3 格式,但我仍然得到同样的错误。 github.com/OpenKinect/libfreenect/blob/master/wrappers/python/…
-
嗯,根据错误信息,变量
PYTHON_SITE_PACKAGES似乎有空值。它设置为wrappers/python/CMakeLists.txt:12处的python单行脚本的输出。您可以尝试单独执行该命令吗? (PYTHON_EXECUTABLE是python2,CMAKE_INSTALL_PREFIX是您输入的)。 -
这是我认为可能是错误的问题,因为我使用的是 Python 3。我确实在 cmake 中手动设置了 PYTHON_SITE_PACKAGES。我还尝试将 cmakefile 更改为读取
${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(prefix='${CMAKE_INSTALL_PREFIX}'))"。该命令在我的 Python 终端中有效,但不能修复 cmake 配置。一件奇怪的事情是,这个命令输出C:/Program Files\Lib\site-packages并带有混合匹配的斜杠分隔目录...... -
据我所知,混合 slaches 对于 cmake 中的路径是可以的。至少,应该设置变量,并且错误消息应该与您观察到的不同。你能检查一下
PYTHON_SITE_PACKAGES是否为空(在使用变量之前使用message()cmake命令)?
标签: python cmake kinect cython