Bottom Page

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.
Quote
#2
Why do you need to install RE2?
It's and old library that was developed up to Python 2.6.

Python 3 re has Unicode support.
Quote:Both patterns and strings to be searched can be Unicode strings (str) as well as 8-bit strings (bytes).
For even more support of regex with Unicode.
Quote:See also The third-party regex module, which has an API compatible with the standard library re module,
but offers additional functionality and a more thorough Unicode support
Quote
#3
The point of installing RE2 is to get faster performance with my regx matches. I did all I could do with in python so looking at other options right now. I don't really "need" to install RE2 - just looking for a better option that can net me some extra speed to hit the time frames I want to hit.
Quote

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  installing pip brecht83 1 61 Nov-09-2018, 04:51 PM
Last Post: snippsat
  Installing Tensorflow-GPU Help junzhi 1 114 Oct-04-2018, 12:40 PM
Last Post: Larz60+
  Installing Tensorflow-GPU junzhi 2 166 Sep-30-2018, 07:43 AM
Last Post: junzhi
  installing OpenPyXl kwfreverie 11 6,623 Jun-24-2018, 04:30 PM
Last Post: Alfonso
  Installing Tensorflow Scott 14 1,407 Jun-04-2018, 04:07 AM
Last Post: Scott
  Help installing NumPy Larry 18 1,601 Feb-20-2018, 09:17 AM
Last Post: Larry
  Installing PyChrome simiugor 5 917 Jan-07-2018, 09:14 PM
Last Post: snippsat
  Installing an interpreter Skipper_Dan 15 1,495 Nov-17-2017, 08:30 PM
Last Post: Skipper_Dan
  installing json Only_On_Tuesdays 6 20,098 Sep-02-2017, 03:13 PM
Last Post: Only_On_Tuesdays
  pip and installing modules deep_logic 2 1,804 Jun-25-2017, 03:23 AM
Last Post: deep_logic

Forum Jump:


Users browsing this thread: 1 Guest(s)