python - 无法在 Windows 7 中安装图形工具

标签 python boost windows-7 mingw boost-python

我想使用 graph-tool在 Windows 7 上,但我在安装时遇到问题。

列出所有要求 here已成功安装。 Python 2.7 安装在 C:\python27 中。 Boost 1.49.0 已使用 mingw 成功编译,安装在 C:\boost 中,BOOST_ROOT 环境变量指向它。 Boost 在调试和 Release模式下编译,静态和动态。


从 MSyS 中调用 configure 会导致以下错误。

configure: error:
  Could not link test program to Python. Maybe the main Python library has been
  installed in some non-standard library path. If so, pass it to configure,
  via the LDFLAGS environment variable.
  Example: ./configure LDFLAGS="-L/usr/non-standard-path/python/lib"
  ============================================================================
   ERROR!
   You probably have to install the development version of the Python package
   for your distribution.  The exact name of this package varies among them.
  ============================================================================

调用 configure LDFLAGS="-LC:/python27/libs" 修复了这个错误,但会导致以下错误

checking for boostlib >= 1.38.0... configure: error: We could not detect the boo
st libraries (version 1.38 or higher). If you have a staged boost library (still
 not installed) please specify $BOOST_ROOT in your environment and do not give a
 PATH to --with-boost option.  If you are sure you have boost installed, then ch
eck your version number looking in <boost/version.hpp>. See http://randspringer.
de/boost for more documentation.

这很奇怪,因为 BOOST_ROOT 已明确定义(使用 printenv 命令检查)。


我尝试的下一个命令是 configure --with-boost="C:/boost"LDFLAGS="-LC:/python27/libs"

checking for boostlib >= 1.38.0... yes
checking whether the Boost::Python library is available... no
configure: error: No usable boost::python found

好的,它检测到 boost,但找不到 boost::python。由于它的大小,我无法在 stackoverflow 上发布 config.log 但你可以找到它 here .

我现在真的很困惑,希望得到任何帮助。

最佳答案

我对为 Windows 编译图形工具(或其他任何工具)的经验为零,但您的 config.log 的以下部分很突出:

    configure:17224: checking whether the Boost::Python library is available
    configure:17254: g++ -c  -Wall -ftemplate-depth-150 -Wno-deprecated -Wno-unknown-pragmas -O99 -fvisibility=default -fvisibility-inlines-hidden -Wno-unknown-pragmas  -Ic:\python27\include conftest.cpp >&5
    conftest.cpp:32:36: fatal error: boost/python/module.hpp: No such file or directory
    compilation terminated.

请注意您传递的 boost 路径如何未被使用!尝试通过 CXXFLAGS="-IC:\boost\include"进行配置。

关于python - 无法在 Windows 7 中安装图形工具,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10433609/

相关文章:

python - 在 MATLAB 中检查梯度而不解决优化问题

python - error_check 引发 ConnectionError

python - Python-Django 中的图像到文本扫描

maven - 在Windows 7上配置Maven时,Files\Java\jdk1.6.0_2 3“”在此时出现意外错误

python - 将括号放入字符串python

c++ - Boost.Thread 定时等待

c++ - Boost.Asio 套接字析构函数关闭连接?

c++ - boost managed_windows_shared_memory find() 崩溃

windows-7 - 具有平台更新的 Windows 7 是否支持桌面复制?

windows-7 - 注册DLL时出错