我试图在 Cygwin 上构建 numpy,但是在 X11/xlocale.h 中定义的 xlocale.h 出现错误>。我天真的补丁是添加这个:
#ifdef __CYGWIN__
#include "X11/Xlocale.h"
#else
#include "xlocale.h"
#endif
或者,我可以将 -I/usr/include/X11 添加到 Makefile 中,但是在 setuptools 中没有 Makefile,我想了解它是如何工作的.
当我键入 python setup.py build_ext 时,Python 如何构建扩展?
请您参考如下方法:
我知道我的解决方案不好,但我最终还是这样做了:
cd /usr/include
ln -s locale.h xlocale.h
运行前:
pip3 install --user -U numpy
它奏效了。
我在 pip 完成安装包后删除了链接。
