简体   繁体   English

无法安装 pyodbc,缺少 header 个文件,命令提示符:致命错误 C1083:无法打开包含文件:'windows.h':没有这样的文件或目录

[英]Cannot install pyodbc, missing header files, command prompt: fatal error C1083: Cannot open include file: 'windows.h': No such file or directory

I'm trying to install pyodbc for python 3.9.2 (32-bit), however I keep getting the error:我正在尝试为 python 3.9.2(32 位)安装 pyodbc,但我不断收到错误消息:

C:\Users\ICAPP02\AppData\Local\Temp\pip-install-0c78okb8\pyodbc_d782ffa5512448c49f83e214e7ec4434\src\pyodbc.h(19): fatal error C1083: Cannot open include file: 'windows.h': No such file or directory error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29910\bin\HostX86\x86\cl.exe' failed with exit code 2 C:\Users\ICAPP02\AppData\Local\Temp\pip-install-0c78okb8\pyodbc_d782ffa5512448c49f83e214e7ec4434\src\pyodbc.h(19): 致命错误 C1083: 无法打开包含文件: 'windows.h': 没有这样的文件或目录错误:命令“C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29910\bin\HostX86\x86\cl.exe”失败,退出代码为 2

I understand I am missing the windows.h C++ header files, but I genuinely cant find them, no longer know where to look, know how many I am missing, or know how they look like.我知道我丢失了 windows.h C++ header 文件,但我真的找不到它们,不再知道去哪里找,不知道我丢失了多少,也不知道它们是什么样子。

Also when I do locate them, do I place them in the folder that is referenced in the error?: C:\Program Files (x86)\Microsoft VisualStudio\2019\Community\VC\Tools\MSVC\14.28.29910\bin\HostX86\x86\cl.exe另外,当我找到它们时,是否将它们放在错误中引用的文件夹中?:C:\Program Files (x86)\Microsoft VisualStudio\2019\Community\VC\Tools\MSVC\14.28.29910\bin\ HostX86\x86\cl.exe

I added a photo of the Visual Studio package I downloaded, perhaps I downloaded the wrong package...我添加了我下载的Visual Studio package的照片,也许我下载错了package ...

For some reason the latest version of pyodbc built a Python 3.9 wheel for 64-bit but not for 32-bit.出于某种原因,最新版本的 pyodbc 为 64 位而不是 32 位构建了 Python 3.9 轮。 However, you can get the 32-bit wheel here:但是,您可以在此处获得 32 位轮:

https://www.lfd.uci.edu/~gohlke/pythonlibs/#pyodbc https://www.lfd.uci.edu/~gohlke/pythonlibs/#pyodbc

You can also just install the windows sdk, for your particular windows version, to resolve this issue您也可以只安装 windows sdk,针对您特定的 windows 版本,以解决此问题

https://developer.microsoft.com/en-us/windows/downloads/windows-sdk/ https://developer.microsoft.com/en-us/windows/downloads/windows-sdk/

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Could not install pycocotools in windows: fatal error C1083: Cannot open include file: 'io.h': No such file or directory 错误: - Could not install pycocotools in windows: fatal error C1083: Cannot open include file: 'io.h': No such file or directory error: 致命错误 C1083:无法打开包含文件:“mecab.h”:没有这样的文件或目录 - fatal error C1083: Cannot open include file: 'mecab.h': No such file or directory 致命错误 C1083:无法打开包含文件:'io.h':没有这样的文件或目录 - fatal error C1083: Cannot open include file: 'io.h': No such file or directory 致命错误C1083:无法打开包含文件:'openssl / opensslv.h':没有这样的文件或目录 - fatal error C1083: Cannot open include file: 'openssl/opensslv.h': No such file or directory 致命错误 C1083:无法打开包含文件:'dlfcn.h':没有这样的文件或目录 PyLPSolve - fatal error C1083: Cannot open include file: 'dlfcn.h': No such file or directory PyLPSolve 无法在 Windows 上安装 lxml,致命错误 C1083:无法打开包含文件:'libxml/xmlversion.h' - Cannot install lxml on windows, fatal error C1083: Cannot open include file: 'libxml/xmlversion.h' Python pip install kivy致命错误C1083:无法打开包含文件:'GL / glew.h':没有这样的文件或目录 - Python pip install kivy fatal error C1083: Cannot open include file: 'GL/glew.h': No such file or directory 无法安装mysql客户端1.3.12出现致命错误C1083:无法打开包含文件:mysql.h:无此类文件或目录 - Unable to install mysql client 1.3.12 getting fatal error C1083: Cannot open include file: 'mysql.h': No such file or directory 无法安装 matplotlib:致命错误 C1083:无法打开包含文件:'ft2build.h':没有这样的文件或目录 - Can't install matplotlib : fatal error C1083: Cannot open include file: 'ft2build.h': No such file or directory 在 Windows x64 中运行 Cython - 致命错误 C1083:无法打开包含文件:'basetsd.h':没有这样的文件或目录 - Running Cython in Windows x64 - fatal error C1083: Cannot open include file: 'basetsd.h': No such file or directory
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM