Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Installing RE2
#1
Trying install RE2 on to windows and I keep hitting hit with the following error:

C:\Users\Owner\AppData\Local\Programs\Python\Python37\python -m pip install re2
Collecting re2
  Using cached https://files.pythonhosted.org/packages/1d/93/17606ff043e3c27cfd50561b906142de1a8debeb958a3ab4226ca66d195e/re2-0.2.22.tar.gz
Installing collected packages: re2
  Running setup.py install for re2 ... error
    Complete output from command C:\Users\Owner\AppData\Local\Programs\Python\Python37\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Owner\\AppData\\Local\\Temp\\pip-install-pad3872m\\re2\\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\Owner\AppData\Local\Temp\pip-record-t7n5g6h_\install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_ext
    building 're2' extension
    creating build
    creating build\temp.win-amd64-3.7
    creating build\temp.win-amd64-3.7\Release
    creating build\temp.win-amd64-3.7\Release\src
    C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\Owner\AppData\Local\Programs\Python\Python37\include -IC:\Users\Owner\AppData\Local\Programs\Python\Python37\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\cppwinrt" /EHsc /Tpsrc/re2.cpp /Fobuild\temp.win-amd64-3.7\Release\src/re2.obj
    re2.cpp
    C:\Users\Owner\AppData\Local\Programs\Python\Python37\include\re2/stringpiece.h(83): error C2039: 'min': is not a member of 'std'
    C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\include\map(20): note: see declaration of 'std'
    C:\Users\Owner\AppData\Local\Programs\Python\Python37\include\re2/stringpiece.h(83): error C3861: 'min': identifier not found
    C:\Users\Owner\AppData\Local\Programs\Python\Python37\include\re2/stringpiece.h(164): error C2039: 'min': is not a member of 'std'
    C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\include\map(20): note: see declaration of 'std'
    C:\Users\Owner\AppData\Local\Programs\Python\Python37\include\re2/stringpiece.h(164): error C3861: 'min': identifier not found
    C:\Users\Owner\AppData\Local\Programs\Python\Python37\include\re2/stringpiece.h(163): error C2789: 'r': an object of const-qualified type must be initialized
    C:\Users\Owner\AppData\Local\Programs\Python\Python37\include\re2/stringpiece.h(163): note: see declaration of 'r'
    C:\Users\Owner\AppData\Local\Programs\Python\Python37\include\re2/re2.h(564): warning C4244: 'return': conversion from 'const int64_t' to 'int', possible loss of data
    src/re2.cpp(2565): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
    src/re2.cpp(3453): warning C4244: '=': conversion from '__int64' to 'int', possible loss of data
    src/re2.cpp(5198): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'int', possible loss of data
    src/re2.cpp(5334): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
    src/re2.cpp(5810): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'int', possible loss of data
    src/re2.cpp(5968): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
    src/re2.cpp(6126): warning C4244: '=': conversion from '__int64' to 'int', possible loss of data
    src/re2.cpp(6634): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'int', possible loss of data
    src/re2.cpp(6708): warning C4244: 'argument': conversion from '__int64' to 'long', possible loss of data
    src/re2.cpp(7826): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'int', possible loss of data
    src/re2.cpp(8273): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'int', possible loss of data
    src/re2.cpp(8380): warning C4244: '=': conversion from '__int64' to 'int', possible loss of data
    src/re2.cpp(11318): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'int', possible loss of data
    src/re2.cpp(14764): error C2039: 'exc_type': is not a member of '_ts'
    c:\users\owner\appdata\local\programs\python\python37\include\pystate.h(209): note: see declaration of '_ts'
    src/re2.cpp(14765): error C2039: 'exc_value': is not a member of '_ts'
    c:\users\owner\appdata\local\programs\python\python37\include\pystate.h(209): note: see declaration of '_ts'
    src/re2.cpp(14766): error C2039: 'exc_traceback': is not a member of '_ts'
    c:\users\owner\appdata\local\programs\python\python37\include\pystate.h(209): note: see declaration of '_ts'
    src/re2.cpp(14767): error C2039: 'exc_type': is not a member of '_ts'
    c:\users\owner\appdata\local\programs\python\python37\include\pystate.h(209): note: see declaration of '_ts'
    src/re2.cpp(14768): error C2039: 'exc_value': is not a member of '_ts'
    c:\users\owner\appdata\local\programs\python\python37\include\pystate.h(209): note: see declaration of '_ts'
    src/re2.cpp(14769): error C2039: 'exc_traceback': is not a member of '_ts'
    c:\users\owner\appdata\local\programs\python\python37\include\pystate.h(209): note: see declaration of '_ts'
    src/re2.cpp(14790): error C2039: 'exc_type': is not a member of '_ts'
    c:\users\owner\appdata\local\programs\python\python37\include\pystate.h(209): note: see declaration of '_ts'
    src/re2.cpp(14791): error C2039: 'exc_value': is not a member of '_ts'
    c:\users\owner\appdata\local\programs\python\python37\include\pystate.h(209): note: see declaration of '_ts'
    src/re2.cpp(14792): error C2039: 'exc_traceback': is not a member of '_ts'
    c:\users\owner\appdata\local\programs\python\python37\include\pystate.h(209): note: see declaration of '_ts'
    src/re2.cpp(14801): error C2039: 'exc_type': is not a member of '_ts'
    c:\users\owner\appdata\local\programs\python\python37\include\pystate.h(209): note: see declaration of '_ts'
    src/re2.cpp(14802): error C2039: 'exc_value': is not a member of '_ts'
    c:\users\owner\appdata\local\programs\python\python37\include\pystate.h(209): note: see declaration of '_ts'
    src/re2.cpp(14803): error C2039: 'exc_traceback': is not a member of '_ts'
    c:\users\owner\appdata\local\programs\python\python37\include\pystate.h(209): note: see declaration of '_ts'
    src/re2.cpp(14804): error C2039: 'exc_type': is not a member of '_ts'
    c:\users\owner\appdata\local\programs\python\python37\include\pystate.h(209): note: see declaration of '_ts'
    src/re2.cpp(14805): error C2039: 'exc_value': is not a member of '_ts'
    c:\users\owner\appdata\local\programs\python\python37\include\pystate.h(209): note: see declaration of '_ts'
    src/re2.cpp(14806): error C2039: 'exc_traceback': is not a member of '_ts'
    c:\users\owner\appdata\local\programs\python\python37\include\pystate.h(209): note: see declaration of '_ts'
    error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.14.26428\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2

    ----------------------------------------
Command "C:\Users\Owner\AppData\Local\Programs\Python\Python37\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Owner\\AppData\\Local\\Temp\\pip-install-pad3872m\\re2\\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\Owner\AppData\Local\Temp\pip-record-t7n5g6h_\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\Owner\AppData\Local\Temp\pip-install-pad3872m\re2\
I was able to compile the code as well from a REcompileWindows I found that created a re2.lib - but I am unsure how to use this to build the final product either or if there is a way to pull that into python instead.
Reply


Messages In This Thread
Installing RE2 - by Mradr - Aug-12-2018, 04:31 PM
RE: Installing RE2 - by snippsat - Aug-12-2018, 05:06 PM
RE: Installing RE2 - by Mradr - Aug-12-2018, 06:12 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020