gpt4 book ai didi

python - 由于 .h 文件出现错误,我无法下载 py4ak lib。 C++ 构建工具存在一些问题,我需要帮助解决

转载 作者:行者123 更新时间:2023-12-03 03:37:04 25 4
gpt4 key购买 nike

当我尝试使用以下命令 pip 安装 py4ak lib 时:

pip install pyk4a --no-use-pep517 --global-option=build_ext --global-option="-IC:\Program Files\Azure Kinect SDK v1.4.1\sdk\include"-- global-option="-LC:\Program Files\Azure Kinect SDK v1.4.1\sdk\windows-desktop\amd64\release\lib"

我收到以下错误:

PS C:\Users\Abdel Nasser\Documents\azure-kinect> pip install pyk4a --no-use-pep517 --global-option=build_ext --global-option="-IC:\Program Files\Azure Kinect SDK v1.4.1\sdk\include" --global-option="-LC:\Program Files\Azure Kinect SDK v1.4.1\sdk\windows-desktop\amd64\release\lib"
>>
WARNING: Disabling all use of wheels due to the use of --build-option / --global-option / --install-option.
WARNING: Ignoring invalid distribution -ywin32 (c:\users\abdel nasser\desktop\python\python38\lib\site-packages)
WARNING: Ignoring invalid distribution -ywin32 (c:\users\abdel nasser\desktop\python\python38\lib\site-packages)
Collecting pyk4a
Using cached pyk4a-1.4.0.tar.gz (23 kB)
Preparing metadata (setup.py) ... done
Requirement already satisfied: numpy in c:\users\abdel nasser\desktop\python\python38\lib\site-packages (from pyk4a) (1.23.0)
Requirement already satisfied: python_version>="3.4" in c:\users\abdel nasser\desktop\python\python38\lib\site-packages (from pyk4a) (0.0.2)
Skipping wheel build for pyk4a, due to binaries being disabled for it.
WARNING: Ignoring invalid distribution -ywin32 (c:\users\abdel nasser\desktop\python\python38\lib\site-packages)
Installing collected packages: pyk4a
Running setup.py install for pyk4a ... error
error: subprocess-exited-with-error

× Running setup.py install for pyk4a did not run successfully.
│ exit code: 1
╰─> [13 lines of output]
Automatically detected kinect SDK. Adding include dir: C:\Program Files\Azure Kinect SDK v1.4.1\sdk\include and library dir C:\Program Files\Azure Kinect SDK v1.4.1\sdk\windows-desktop\AMD64\release\lib.
c:\users\abdel nasser\desktop\python\python38\lib\site-packages\setuptools\dist.py:771: UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead
warnings.warn(
running build_ext
building 'k4a_module' extension
creating build
creating build\temp.win-amd64-cpython-38
creating build\temp.win-amd64-cpython-38\Release
creating build\temp.win-amd64-cpython-38\Release\pyk4a
"C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.32.31326\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD "-IC:\Program Files\Azure Kinect SDK v1.4.1\sdk\include" "-Ic:\users\abdel nasser\desktop\python\python38\lib\site-packages\numpy\core\include" "-IC:\Program Files\Azure Kinect SDK v1.4.1\sdk\include" "-Ic:\users\abdel nasser\desktop\python\python38\include" "-Ic:\users\abdel nasser\desktop\python\python38\Include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.32.31326\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.32.31326\include" /EHsc /Tppyk4a/pyk4a.cpp /Fobuild\temp.win-amd64-cpython-38\Release\pyk4a/pyk4a.obj
pyk4a.cpp
c:\users\abdel nasser\desktop\python\python38\include\pyconfig.h(59): fatal error C1083: Cannot open include file: 'io.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.32.31326\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> pyk4a

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
WARNING: Ignoring invalid distribution -ywin32 (c:\users\abdel nasser\desktop\python\python38\lib\site-packages)
WARNING: Ignoring invalid distribution -ywin32 (c:\users\abdel nasser\desktop\python\python38\lib\site-packages)
WARNING: Ignoring invalid distribution -ywin32 (c:\users\abdel nasser\desktop\python\python38\lib\site-packages)

Image of C++ build tools that are installed

我完全不知道如何处理这个问题:

c:\users\abdel nasser\desktop\python\python38\include\pyconfig.h(59): fatal error C1083:无法打开包含文件:“io.h”:没有此类文件或目录错误:命令'C:\\Program Files(x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.32.31326\\bin\\HostX86\\x64\\cl。 exe' 失败,退出代码 2 [输出结束]任何帮助将不胜感激。

最佳答案

  • 要解决该错误,请通过定义指向 io.h 路径的环境变量 INCLUDE 来使 VS 编译器能够查找 header 。
  • io.h 的位置可能会因版本和环境的不同而发生变化。

引用文献:
'io.h': No such file or directory during "pip install netifaces"

关于python - 由于 .h 文件出现错误,我无法下载 py4ak lib。 C++ 构建工具存在一些问题,我需要帮助解决,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/72939970/

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