本文介绍了python-config上可能的错误?它不会显示使用--ldflags时的完整路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

$ python-config --ldflags
-L/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config -ldl -framework CoreFoundation -lpython2.7 -u _PyMac_Error Python.framework/Versions/2.7/Python

它打印Python.framework/Versions/2.7/Python而不是/Library/Frameworks/Python.framework/Versions/2.7/Python

当尝试在Makefile中使用它时,它不适用于python-config --ldflags,但是如果我获取输出并将Python.framework/Versions/2.7/Python更改为/Library/Frameworks/Python.framework/Versions/2.7/Python,它会很好地工作.

when trying to use it in a Makefile it doesn't work with the python-config --ldflags but if I take the output and changes Python.framework/Versions/2.7/Python to /Library/Frameworks/Python.framework/Versions/2.7/Python it works perfectly.

  • 我想避免使用解析python-config输出的解决方案生成文件.
  • 我正在使用gcc version 4.2.1
  • I want to avoid a solution which parses the python-config output inthe makefile.
  • I am using gcc version 4.2.1

推荐答案

这是一个已知的错误,已在三周前修复: http://bugs.python.org/issue16848 .该修补程序将随2.7.4版本一起提供,该版本计划于4月6日上线.

This is a known bug, and it was fixed three weeks ago: http://bugs.python.org/issue16848. The fix will ship with the 2.7.4 release, which is scheduled to go live on April 6.

这篇关于python-config上可能的错误?它不会显示使用--ldflags时的完整路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-03 02:05