python - 构建 Lupa 时出错(可能是 pkg-config 的问题)

标签 python windows lua mingw pkg-config

我正在尝试编译 lupa在 Windows 7 64 位上,我已经安装了所有依赖项(包括 LuaJIT2 和 Lua 5.2)。但是当我尝试安装时,出现了这个错误:

RuntimeError: Neither LuaJIT2 nor Lua 5.1 were found, please install the library and its development packages, or put a local build into the lupa main directory (or pass '--no-luajit' option)

这也让我感到困惑,因为它检查 Lua 5.2 和 5.1,但提示我没有 5.1。

Checking for installed lua5.2 library using pkg-config
Did not find lua5.2 using pkg-config: pkg-config cannot find an installed lua5.2

Checking for installed lua-5.2 library using pkg-config
Did not find lua-5.2 using pkg-config: pkg-config cannot find an installed lua-5 .2

Checking for installed lua library using pkg-config
Did not find lua using pkg-config: pkg-config cannot find an installed lua

Checking for installed lua5.1 library using pkg-config
Did not find lua5.1 using pkg-config: pkg-config cannot find an installed lua5.1

Checking for installed lua-5.1 library using pkg-config
Did not find lua-5.1 using pkg-config: pkg-config cannot find an installed lua-5 .1

Checking for installed lua library using pkg-config
Did not find lua using pkg-config: pkg-config cannot find an installed lua

我很确定这是 pkg-config 的问题。我查看了 setup.py,它使用 pkg-config 来测试包是否存在,并获取版本。 pkg-config 直接从控制台运行时找不到任何包。当我寻找一个(在本例中为 LuaJIT2)时,我得到了这个:

Package luajit was not found in the pkg-config search path.
Perhaps you should add the directory containing `luajit.pc' to the PKG_CONFIG_PATH environment variable
No package 'luajit' found

没有名为PG_CONFIG_PATH 的环境变量,手动添加也没有用。 请帮忙,我很难过。如果您需要更多信息,请告诉我。

最佳答案

需要将LuaJIT包解压到LUPA的根目录下

如果 lupa 位于“D:\project\lupa1.1”,则需要将 LuaJIT 放入该目录,例如“D:\project\lupa1.1\LuaJIT-2.0.3”。

试试吧,祝你好运!

关于python - 构建 Lupa 时出错(可能是 pkg-config 的问题),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26822873/

相关文章:

python - 解释器会编译Python脚本吗?

java - 如何使用 ProcessBuilder 将值从 Python 脚本返回到 Java?

python - 使用 Prince 包在 Python 中获取多重对应分析 (MCA) 图

java - 为什么没有 “while(true)” 的 “Thread.sleep” 在 Linux 上会导致 100% 的 CPU 使用率,但在 Windows 上却不会?

java - 在基于 Windows 的 VPS 中从 Java Access Ubuntu 服务器中托管的 MS Access?

c++ - SLB中绑定(bind)单例

url - 在字符串 lua 模式中查找 url

python - stack-less Python的微线程在游戏状态机实现上比Lua的协程有什么优势?

python - 计算列表元素时区分 0 和 False

windows - Windows 上有哪些熵源可用?