Windows:致命错误C1083:无法打开包含文件:'lua.h':没有这样的文件或目录

时间:2016-04-03 10:31:37

标签: python windows lua lupa

我已尝试使用pip install -r requirements.txt在Windows中对python项目的一些要求,但是这仍然失败。经过一番调查后,我发现它因lupa而失败。 运行“pip install lupa”会显示与我尝试安装需求时相同的错误,如下面的堆栈跟踪所示:

Collecting lupa
  Using cached lupa-1.2.tar.gz
Building wheels for collected packages: lupa
  Running setup.py bdist_wheel for lupa: started
  Running setup.py bdist_wheel for lupa: finished with status 'error'
  Complete output from command d:\development\tools\python\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Achiraaz\\AppData\\Local\\Temp\\pip-build-g477k1jp\\lupa\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d C:\Users\Achiraaz\AppData\Local\Temp\tmped2hn2icpip-wheel- --python-tag cp35:
  No local build of LuaJIT2 found in lupa directory
  Checking for installed luajit library using pkg-config
  pkg-config found luajit version 2.0.4

  building without Cython
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib.win32-3.5
  creating build\lib.win32-3.5\lupa
  copying lupa\version.py -> build\lib.win32-3.5\lupa
  copying lupa\__init__.py -> build\lib.win32-3.5\lupa
  running build_ext
  building 'lupa._lupa' extension
  creating build\temp.win32-3.5
  creating build\temp.win32-3.5\Release
  creating build\temp.win32-3.5\Release\lupa
  D:\Development\IDE\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DLUA_COMPAT_ALL -I/usr/include/luajit-2.0 -Id:\development\tools\python\include -Id:\development\tools\python\include "-ID:\Development\IDE\Microsoft Visual Studio 14.0\VC\INCLUDE" "-ID:\Development\IDE\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10586.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10586.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10586.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10586.0\winrt" "-ID:\Development\IDE\Microsoft Visual Studio 14.0\VC\INCLUDE" "-ID:\Development\IDE\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10586.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10586.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10586.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10586.0\winrt" /Tclupa/_lupa.c /Fobuild\temp.win32-3.5\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 'D:\\Development\\IDE\\Microsoft Visual Studio 14.0\\VC\\BIN\\cl.exe' failed with exit status 2

  ----------------------------------------
  Running setup.py clean for lupa
Failed to build lupa
Installing collected packages: lupa
  Running setup.py install for lupa: started
    Running setup.py install for lupa: finished with status 'error'
    Complete output from command d:\development\tools\python\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Achiraaz\\AppData\\Local\\Temp\\pip-build-g477k1jp\\lupa\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record C:\Users\Achiraaz\AppData\Local\Temp\pip-5d7gkihi-record\install-record.txt --single-version-externally-managed --compile:
    No local build of LuaJIT2 found in lupa directory
    Checking for installed luajit library using pkg-config
    pkg-config found luajit version 2.0.4

    building without Cython
    running install
    running build
    running build_py
    creating build
    creating build\lib.win32-3.5
    creating build\lib.win32-3.5\lupa
    copying lupa\version.py -> build\lib.win32-3.5\lupa
    copying lupa\__init__.py -> build\lib.win32-3.5\lupa
    running build_ext
    building 'lupa._lupa' extension
    creating build\temp.win32-3.5
    creating build\temp.win32-3.5\Release
    creating build\temp.win32-3.5\Release\lupa
    D:\Development\IDE\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DLUA_COMPAT_ALL -I/usr/include/luajit-2.0 -Id:\development\tools\python\include -Id:\development\tools\python\include "-ID:\Development\IDE\Microsoft Visual Studio 14.0\VC\INCLUDE" "-ID:\Development\IDE\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10586.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10586.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10586.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10586.0\winrt" "-ID:\Development\IDE\Microsoft Visual Studio 14.0\VC\INCLUDE" "-ID:\Development\IDE\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10586.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10586.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10586.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10586.0\winrt" /Tclupa/_lupa.c /Fobuild\temp.win32-3.5\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 'D:\\Development\\IDE\\Microsoft Visual Studio 14.0\\VC\\BIN\\cl.exe' failed with exit status 2

    ----------------------------------------

我首先尝试使用http://luajit.org/install.html中描述的方法编译和安装luajit,但这并没有解决问题。

然后我设法使用hererocks安装luajit(至少我认为我做过),但由于某种原因,即使文件位于luajit / include库中,它也不会选择lua.h,所以最终结果是相同的

我找到了这篇文章:Building luafilesystem for Lua for Windows 我尝试了解所描述的环境变量,但没有运气..

在我看来,文件由于某种原因未包含在构建中,我无法解决此问题。

赞赏所有或任何帮助和建议。

我正在使用visual studio express版运行Windows 10。我安装了cygwin和mingw,但如果可能的话,我想坚持使用SDK。

0 个答案:

没有答案