gpt4 book ai didi

python - 无法构建 Lupa

转载 作者:太空宇宙 更新时间:2023-11-03 17:16:19 25 4
gpt4 key购买 nike

我正在尝试在 Windows 7 64 位上编译 Lupa,并且我已经安装了所有依赖项(包括 LuaJIT2 和 Lua 5.2)。但是当我尝试通过运行

安装时

python setup.py install

我收到有关依赖项的错误,通常是 .m 文件。

例如:

lupa/_lupa.c(265) : fatal error C1083: Cannot open include file: 'lua.h': No such file or directory

我尝试过手动添加文件,但这只会导致更多问题,如下所示:

c:\mingw\include\stdint.h:118:0: note: this is the location of the previous definition
#define INT_LEAST64_MIN INT64_MIN
^
In file included from _lupa.c:271:0:
stdint.h:154:0: warning: "INT_LEAST64_MAX" redefined [enabled by default]
#define INT_LEAST64_MAX 0x7fffffffffffffff
^
In file included from c:\mingw\lib\gcc\mingw32\4.8.1\include\stdint.h:9:0,
from c:\mingw\include\wchar.h:876,
from unicodeobject.h:120,
from Python.h:85,
from _lupa.c:30:
c:\mingw\include\stdint.h:123:0: note: this is the location of the previous definition
#define INT_LEAST64_MAX INT64_MAX
^
In file included from _lupa.c:271:0:
stdint.h:155:0: warning: "UINT_LEAST64_MAX" redefined [enabled by default]
#define UINT_LEAST64_MAX 0xffffffffffffffffU
^

请注意,这是我在控制台中收到的垃圾邮件的一小段摘录。我尝试过的事情超出了我所能追踪的范围。我尝试使用 gcc 但没有成功,请 friend 尝试帮助我。我完全被难住了。请帮助我!

哦,这是我尝试在不更改文件的情况下运行安装程序的完整日志:

No local build of LuaJIT2 found in lupa directory
Checking for installed luajit library using pkg-config
pkg-config found luajit version 2.0.3

building without Cython
running install
running bdist_egg
running egg_info
writing lupa.egg-info\PKG-INFO
writing top-level names to lupa.egg-info\top_level.txt
writing dependency_links to lupa.egg-info\dependency_links.txt
writing lupa.egg-info\PKG-INFO
writing top-level names to lupa.egg-info\top_level.txt
writing dependency_links to lupa.egg-info\dependency_links.txt
reading manifest file 'lupa.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'lupa.egg-info\SOURCES.txt'
installing library code to build\bdist.win-amd64\egg
running install_lib
running build_py
copying lupa\version.py -> build\lib.win-amd64-2.7\lupa
running build_ext
building 'lupa._lupa' extension
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\amd64\cl.exe /c /nolog
o /Ox /MD /W3 /GS- /DNDEBUG -DLUA_COMPAT_ALL -I/usr/local/include/luajit-2.0 -IC
:\Python27\include -IC:\Python27\PC /Tclupa/_lupa.c /Fobuild\temp.win-amd64-2.7\
Release\lupa/_lupa.obj
_lupa.c
lupa/_lupa.c(265) : fatal error C1083: Cannot open include file: 'lua.h': No such file or directory
error: command '"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\amd64
\cl.exe"' failed with exit status 2

最佳答案

我不知道您是否仍然需要这个答案,但我遇到了同样的问题,并查看了 lupa 文件夹并看到了 lupa.pyx 这意味着您需要 Cython。事先运行 pip install cython 对我有用。

关于python - 无法构建 Lupa,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33645073/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com