简体   繁体   English

致命错误 C1083:无法打开包含文件:“basetsd.h”

[英]fatal error C1083: Cannot open include file: 'basetsd.h'

So i have been trying to install Scrapy for Python for the last couple of days.所以最近几天我一直在尝试为 Python 安装 Scrapy。 Trying anything i could think off and read everything i have come across with similar problems, but haven't been able to find a solution.尝试任何我能想到的东西并阅读我遇到的类似问题的所有内容,但一直无法找到解决方案。 So here is the code.所以这里是代码。

Thank you.谢谢你。

building 'twisted.test.raiser' extension
    creating build\temp.win32-3.6
    creating build\temp.win32-3.6\Release
    creating build\temp.win32-3.6\Release\src
    creating build\temp.win32-3.6\Release\src\twisted
    creating build\temp.win32-3.6\Release\src\twisted\test
    C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DWIN32=1 "-Ic:\users\karl holst\appdata\local\programs\python\python36-32\include" "-Ic:\users\karl holst\appdata\local\programs\python\python36-32\include" "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.15063.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.15063.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.15063.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.15063.0\winrt" /Tcsrc/twisted/test/raiser.c /Fobuild\temp.win32-3.6\Release\src/twisted/test/raiser.obj
    raiser.c
    c:\users\karl holst\appdata\local\programs\python\python36-32\include\pyconfig.h(222): fatal error C1083: Cannot open include file: 'basetsd.h': No such file or directory
    error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\cl.exe' failed with exit status 2

    ----------------------------------------
Command ""c:\users\karl holst\appdata\local\programs\python\python36-32\python.exe" -u -c "import setuptools, tokenize;__file__='C:\\Users\\KARLHO~1\\AppData\\Local\\Temp\\pip-build-ylmjilcy\\Twisted\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\KARLHO~1\AppData\Local\Temp\pip-hjzcemls-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\KARLHO~1\AppData\Local\Temp\pip-build-ylmjilcy\Twisted\

edit - the code i have used is "pip install Scrapy"编辑-我使用的代码是“pip install Scrapy”

I had a very similiar issue involving Scrapy which also failed when it came to the Twisted part of the installation.我有一个非常相似的问题,涉及到 Scrapy,它在安装的 Twisted 部分也失败了。 My answer should still apply to your issue, it involves updating your SDK and making sure your .exe files are in the right location.我的回答应该仍然适用于您的问题,它涉及更新您的 SDK 并确保您的.exe文件位于正确的位置。

Got Scrapy installed in the end perfectly.最终完美安装了 Scrapy。 Hope this helps.希望这可以帮助。

安装 Microsoft Visual C++ Compiler for Python 2.7 https://www.microsoft.com/en-us/download/confirmation.aspx?id=44266后尝试

Must have the most recent version of Microsoft Visual C++ Build Tools.必须具有最新版本的 Microsoft Visual C++ 构建工具。 In my case it was 2017.就我而言,那是 2017 年。

It's like 6GB which is unfortunate because I feel like I get 20MB worth of use from it.它就像 6GB,这是不幸的,因为我觉得我从中获得了 20MB 的价值。 But that's what is needed.但这就是所需要的。

It can be downloaded with Visual Studio Installer.它可以通过 Visual Studio 安装程序下载。

Deployed below components from VC++ installer.从 VC++ 安装程序部署到以下组件。 Then try pip install pandas.然后尝试 pip install pandas。 It worked for me.它对我有用。

C++/CLI support for v142 build tools (14.24)对 v142 构建工具的 C++/CLI 支持 (14.24)

MSVC v140 - VS 2015 C++ build tools (v14.00) MSVC v140 - VS 2015 C++ 构建工具 (v14.00)

MSVC v141 - VS 2017 C++ ARM build tools (v14.16) MSVC v141 - VS 2017 C++ ARM 构建工具 (v14.16)

MSVC v141 - VS 2017 C++ ARM64 build tools (v14.16) MSVC v141 - VS 2017 C++ ARM64 构建工具 (v14.16)

MSVC v141 - VS 2017 C++ x64/x86 build tools (v14.16) MSVC v141 - VS 2017 C++ x64/x86 构建工具 (v14.16)

MSVC v141 - VS 2017 C++ x64/x86 Spectre-mitigated libs (v14.16) MSVC v141 - VS 2017 C++ x64/x86 Spectre-mitigated libs (v14.16)

C++ 2019 Redistributable Update C++ 2019 可再发行更新

C++ Clang Compiler for Windows (9.0.0)适用于 Windows 的 C++ Clang 编译器 (9.0.0)

C++ Clang-cl for v142 build tools (x64/x86)用于 v142 构建工具的 C++ Clang-cl (x64/x86)

C++ CMake tools for Windows适用于 Windows 的 C++ CMake 工具

C++ Modules for v142 build tools (x64/x86 – experimental)用于 v142 构建工具的 C++ 模块(x64/x86 – 实验性)

I could solve this problem by downloading and installing the latest Windows 10 SDK from this link: https://software-download.microsoft.com/download/pr/19041.685.201201-2105.vb_release_svc_prod1_WindowsSDK.iso我可以通过从以下链接下载并安装最新的 Windows 10 SDK 来解决这个问题: https : //software-download.microsoft.com/download/pr/19041.685.201201-2105.vb_release_svc_prod1_WindowsSDK.iso

and the basetsd.h file appeared in the following folder:并且 basetsd.h 文件出现在以下文件夹中:

C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.19041.0\\shared C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.19041.0\\shared

暂无
暂无

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

相关问题 在 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 编译Cython代码产生...致命错误C1083:无法打开包含文件:'io.h' - Compiling Cython code yields… fatal error C1083: Cannot open include file: 'io.h' 致命错误 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 SWIG致命错误C1083:无法打开包含文件 - SWIG Fatal error C1083: Cannot open include file 致命错误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 致命错误 C1083:无法打开包含文件:'openssl/opensslv.h' - Fatal error C1083: Cannot open include file: 'openssl/opensslv.h' Tokyocabinet致命错误C1083:无法打开包含文件:tcbdb.h - Tokyocabinet fatal error C1083 : cannot open include file:tcbdb.h 无法在 Windows 上安装 lxml,致命错误 C1083:无法打开包含文件:'libxml/xmlversion.h' - Cannot install lxml on windows, fatal error C1083: Cannot open include file: 'libxml/xmlversion.h'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM