Domanda

I installed Visual Studio 2010 and that gave me the C++ compiler

C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat

However when I tried to build an app (a Python package), I got an error about missing

C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\io.h

On investigation, that include folder is almost empty (just three files).

What bit of Windows / Visual Studio do I need to install to populate the include folder?


What I'm trying to do:

pip install lxml

What happens

Building lxml version 3.3.5.
Building without Cython.
C:\Python34\include\pyconfig.h(68) : fatal error C1083: Cannot open include file: 'io.h': No such file or directory

È stato utile?

Soluzione

Solved by following Installation of Visual Studio 2010 (any edition) installs only 2 files in the C++ headers directory

  • Uninstall Visual Studio 2010.
  • Uninstall Visual Studio 2010 SP1 (despite the warning it gives).
  • Open Registry Editor (regedit).
  • Search for keys named PaddedVersion
  • Remove any parent keys VisualStudio\10.0\VC\Libraries, or similar (note the version number 10.0, which corresponds to 2010). Delete all of these registry paths. The search for the PaddedVersion key is just to ease up this search.
  • Install Visual Studio 2010.

Altri suggerimenti

In my case it was conflict between Visual Studio 2010 Express (installed long time ago) and Visual C++ Build Tools. io.h was not available in C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include, but was in C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include (so probably was skipped while installing Build Tools). When I added C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin to PATH it couldn't find io.h.

BTW. I think whole Visual Studio is not required, Visual C++ Build Tools should work too.

Visual C++ Build Tools just work!Before I have installed Visual Studio 2017 Community.Then I install Visual C++ Build Tools 2015,it just works!

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top