3

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

Colonel Panic
  • 132,665
  • 89
  • 401
  • 465
  • This is not an uncommon install accident, nobody yet has explained what they did to their machine to make it happen. Given the secrecy, I assume it has something to do with having a version installed on the machine before that was unlicensed and not cleanly uninstalling it. Which leaves install information in the registry that says that parts of VS are already installed. Rerun setup.exe with the /uninstall /force options to force a cleanup, then install again. Never heard anything back after that so it probably works. – Hans Passant Apr 25 '14 at 16:18
  • Thanks Hans, I'll try that. Yes, previously had Visual Studio 2010 on the computer before. I recall there were about twenty related-sounding items in the 'add-remove programs' menu, I removed them at random until I got bored. – Colonel Panic Apr 25 '14 at 22:03
  • No dodgy licenses or anything--this was at work (my home computer isn't even fast enough for Visual Studio). – Colonel Panic Apr 25 '14 at 22:05
  • @HansPassant which `setup.exe` do you mean? – Colonel Panic Apr 28 '14 at 09:20
  • Just setup, the VS installer. – Hans Passant Apr 28 '14 at 11:03
  • Uninstalled and reinstalled twice, no progress. – Colonel Panic Apr 28 '14 at 13:29
  • Solved by following http://stackoverflow.com/questions/12460307/installation-of-visual-studio-2010-any-edition-installs-only-2-files-in-the-c – Colonel Panic Apr 28 '14 at 14:37

3 Answers3

2

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.
ivan_pozdeev
  • 33,874
  • 19
  • 107
  • 152
Colonel Panic
  • 132,665
  • 89
  • 401
  • 465
1

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.

Wirone
  • 3,304
  • 1
  • 29
  • 48
1

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!

user6379829
  • 61
  • 1
  • 1