Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RE2 Windows install #52

Open
Mradr opened this issue Aug 7, 2018 · 5 comments
Open

RE2 Windows install #52

Mradr opened this issue Aug 7, 2018 · 5 comments

Comments

@Mradr
Copy link

Mradr commented Aug 7, 2018

I'm a bit confused on how to install this for Windows 10. I do pip install pre2 and I get the following error. I am running python 3.7 and moved what I thought was the right files from the google install into the included path, but I'm not sure if I am just missing something here.

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-hjrm6n2i\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-j5_hq7nk\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
src/re2.cpp(2037): warning C4267: 'argument': conversion from 'size_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(3462): warning C4267: '=': conversion from 'size_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(5968): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
src/re2.cpp(6126): warning C4267: '=': conversion from 'size_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(6721): warning C4267: 'argument': conversion from 'size_t' to 'long', possible loss of data
src/re2.cpp(6947): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data
src/re2.cpp(7064): warning C4267: 'argument': conversion from 'size_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(8433): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data
src/re2.cpp(8562): warning C4267: 'argument': conversion from 'size_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-hjrm6n2i\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-j5_hq7nk\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\Owner\AppData\Local\Temp\pip-install-hjrm6n2i\re2\

@luoqishuai
Copy link

I run ' pip install re2' on cmd commond.
The following problems occurred.
pip install re2
Collecting re2
Downloading https://files.pythonhosted.org/packages/14/b0/e3476ed13e60fc7fb0d172926809c53be7a8d02f14191ada449a6d572dcb/re2-0.2.24.tar.gz (1.9MB)
100% |████████████████████████████████| 1.9MB 1.8MB/s
Building wheels for collected packages: re2
Running setup.py bdist_wheel for re2 ... error
Complete output from command f:\anaconda\python.exe -u -c "import setuptools, tokenize;file='C:\Users\qiqiq\AppData\Local\Temp\pip-install-ttpcaxkz\re2\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" bdist_wheel -d C:\Users\qiqiq\AppData\Local\Temp\pip-wheel-btv9cuhb --python-tag cp36:
running bdist_wheel
running build
running build_ext
building 're2' extension
creating build
creating build\temp.win-amd64-3.6
creating build\temp.win-amd64-3.6\Release
creating build\temp.win-amd64-3.6\Release\src
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -If:\anaconda\include -If:\anaconda\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\winrt" /EHsc /Tpsrc/re2.cpp /Fobuild\temp.win-amd64-3.6\Release\src/re2.obj -std=c++11
cl : Command line warning D9002 : ignoring unknown option '-std=c++11'
re2.cpp
src/re2.cpp(201): fatal error C1083: Cannot open include file: 're2/stringpiece.h': No such file or directory
error: command 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe' failed with exit status 2


Failed building wheel for re2
Running setup.py clean for re2
Failed to build re2
Installing collected packages: re2
Running setup.py install for re2 ... error
Complete output from command f:\anaconda\python.exe -u -c "import setuptools, tokenize;file='C:\Users\qiqiq\AppData\Local\Temp\pip-install-ttpcaxkz\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\qiqiq\AppData\Local\Temp\pip-record-xcj433tp\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.6
creating build\temp.win-amd64-3.6\Release
creating build\temp.win-amd64-3.6\Release\src
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -If:\anaconda\include -If:\anaconda\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\winrt" /EHsc /Tpsrc/re2.cpp /Fobuild\temp.win-amd64-3.6\Release\src/re2.obj -std=c++11
cl : Command line warning D9002 : ignoring unknown option '-std=c++11'
re2.cpp
src/re2.cpp(201): fatal error C1083: Cannot open include file: 're2/stringpiece.h': No such file or directory
error: command 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe' failed with exit status 2

----------------------------------------

Command "f:\anaconda\python.exe -u -c "import setuptools, tokenize;file='C:\Users\qiqiq\AppData\Local\Temp\pip-install-ttpcaxkz\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\qiqiq\AppData\Local\Temp\pip-record-xcj433tp\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\qiqiq\AppData\Local\Temp\pip-install-ttpcaxkz\re2
You are using pip version 18.0, however version 19.0.2 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

@luoqishuai
Copy link

My operating system is windows
Then i download https://github.com/axiak/pyre2 .
cd pyre2-master
run 'python setup.py install'
python setup.py install
running install
running build
running build_ext
building 're2' extension
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IF:\python\module\pyre2\pyre2-master -IF:\ANACONDA\include -IF:\ANACONDA\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\winrt" /EHsc /Tpsrc/re2.cpp /Fobuild\temp.win-amd64-3.6\Release\src/re2.obj
re2.cpp
src/re2.cpp(201): fatal error C1083: Cannot open include file: 're2/stringpiece.h': No such file or directory
error: command 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe' failed with exit status 2

@axiak
Copy link
Owner

axiak commented Feb 20, 2019

@luoqishuai did you install the re2 library into your VSC++ environment?

@omgnobody121
Copy link


C:\Users\Tewni\Desktop\Random\adblock>pip install re2
Collecting re2
  Using cached re2-0.2.24.tar.gz (1.9 MB)
Using legacy setup.py install for re2, since package 'wheel' is not installed.
Installing collected packages: re2
    Running setup.py install for re2 ... error
    ERROR: Command errored out with exit status 1:
     command: 'C:\Users\Tewni\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Tewni\\AppData\\Local\\Temp\\pip-install-smhumwah\\re2\\setup.py'"'"'; __file__='"'"'C:\\Users\\Tewni\\AppData\\Local\\Temp\\pip-install-smhumwah\\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\Tewni\AppData\Local\Temp\pip-record-joqy_5bn\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\Tewni\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\Include\re2'
         cwd: C:\Users\Tewni\AppData\Local\Temp\pip-install-smhumwah\re2\
    Complete output (13 lines):
    running install
    running build
    running build_ext
    building 're2' extension
    creating build
    creating build\temp.win-amd64-3.8
    creating build\temp.win-amd64-3.8\Release
    creating build\temp.win-amd64-3.8\Release\src
    C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD "-IC:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1520.0_x64__qbz5n2kfra8p0\include" "-IC:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1520.0_x64__qbz5n2kfra8p0\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" /EHsc /Tpsrc/re2.cpp /Fobuild\temp.win-amd64-3.8\Release\src/re2.obj -std=c++11
    cl : Command line warning D9002 : ignoring unknown option '-std=c++11'
    re2.cpp
    src/re2.cpp(201): fatal error C1083: Cannot open include file: 're2/stringpiece.h': No such file or directory
    error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.26.28801\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\Tewni\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Tewni\\AppData\\Local\\Temp\\pip-install-smhumwah\\re2\\setup.py'"'"'; __file__='"'"'C:\\Users\\Tewni\\AppData\\Local\\Temp\\pip-install-smhumwah\\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\Tewni\AppData\Local\Temp\pip-record-joqy_5bn\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\Tewni\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\Include\re2' Check the logs for full command output.
WARNING: You are using pip version 20.1.1; however, version 20.2.2 is available.
You should consider upgrading via the 'C:\Users\Tewni\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\python.exe -m pip install --upgrade pip' command.

i have this problem aswell

@mat926
Copy link

mat926 commented Jan 7, 2024

I have the same problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants