2
votes

I am using Windows 8 and Python 2.7.9. I tried to install esmre with pip, but have the following error:

src/aho_corasick.c(48) : fatal error C1083: Cannot open include file: 'stdbool .h': No such file or directory error: command 'C:\Users\CHALLEN QU\AppData\Local\Programs\Common\Micro soft\Visual C++ for Python\9.0\VC\Bin\cl.exe' failed with exit status 2

Failed building wheel for esmre
Failed to build esmre


Things I have already tried:

  1. Reinstall Microsoft Visual C++ compiler for Python 2.7
  2. Upgrade pip and setuptools
  3. Look for a compiled version of esmre, which I have not found
  4. Install esmre with easy_install or the setup.py inside the package.

It seems that I just can't compile it.

1

1 Answers

1
votes

"stdbool.h" is not a C++ header and Visual 2010 doesn't support C99.

As a workaround you could locate Visual's "include" directory and add "stdbool.h" file with the following contents:

typedef int bool;
#define false 0
#define true 1

as presented in this answer or

#pragma once

#define false   0
#define true    1

#define bool int

from this answer.

Another workaround in the linked thread is to use a different compiler.