google / re2

RE2 is a fast, safe, thread-friendly alternative to backtracking regular expression engines like those used in PCRE, Perl, and Python. It is a C++ library.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Failed Building wheel for google-re2

Zubz21 opened this issue · comments

I am trying to install google -re2 and ultimately install apache airflow but I keep getting the following error.
30 warnings and 20 errors generated.
error: command '/usr/bin/gcc' failed with exit code 1
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for google-re2
Running setup.py clean for google-re2
Failed to build google-re2
ERROR: Could not build wheels for google-re2, which is required to install pyproject.toml-based projects

Sorry, the nature of the failure isn't clear from that output. Could you please provide more detailed information? Alternatively, are you able to install one of the built wheels with pip install google-re2?

I am not able to install any wheels from running pip install google-re2. The main error code is "ERROR: Failed building wheel for google-re2".

I believe I have all the dependencies and correct versions installed. Not sure what else I could try

As per https://pypi.org/project/google-re2/#files, the built wheels support quite a comprehensive range of platforms. Are you using a platform that isn't supported? Also, what are the "30 warnings and 20 errors generated"? I can't really debug further without that information.

Hi,

I am running into the same error related to apache-airflow installation. Using python 3.10.11 and MacOS Catalina version 10.15.7. The errors are below. Let me know if I can provide any further information that will help.

Collecting google-re2
Using cached google-re2-1.0.tar.gz (9.8 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: google-re2
Building wheel for google-re2 (pyproject.toml) ... error
error: subprocess-exited-with-error

× Building wheel for google-re2 (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [177 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-10.9-universal2-cpython-310
copying re2.py -> build/lib.macosx-10.9-universal2-cpython-310
running build_ext
building '_re2' extension
creating build/temp.macosx-10.9-universal2-cpython-310
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -I/Library/Frameworks/Python.framework/Versions/3.10/include/python3.10 -c _re2.cc -o build/temp.macosx-10.9-universal2-cpython-310/_re2.o -fvisibility=hidden
In file included from _re2.cc:11:
In file included from /usr/local/include/pybind11/pybind11.h:13:
In file included from /usr/local/include/pybind11/detail/class.h:12:
In file included from /usr/local/include/pybind11/detail/../attr.h:13:
/usr/local/include/pybind11/detail/common.h:475:17: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using ssize_t = Py_ssize_t;
^
/usr/local/include/pybind11/detail/common.h:476:16: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using size_t = std::size_t;
^
/usr/local/include/pybind11/detail/common.h:485:6: warning: scoped enumerations are a C++11 extension [-Wc++11-extensions]
enum class return_value_policy : uint8_t {
^
/usr/local/include/pybind11/detail/common.h:538:15: error: unknown type name 'constexpr'
inline static constexpr int log2(size_t n, int k = 0) {
^
/usr/local/include/pybind11/detail/common.h:543:15: error: unknown type name 'constexpr'
inline static constexpr size_t size_in_ptrs(size_t s) {
^
/usr/local/include/pybind11/detail/common.h:543:1: warning: inline variables are a C++17 extension [-Wc++17-extensions]
inline static constexpr size_t size_in_ptrs(size_t s) {
^
/usr/local/include/pybind11/detail/common.h:543:31: error: expected ';' after top level declarator
inline static constexpr size_t size_in_ptrs(size_t s) {
^
;
/usr/local/include/pybind11/detail/common.h:573:39: error: use of undeclared identifier 'instance_simple_holder_in_ptrs'
void *simple_value_holder[1 + instance_simple_holder_in_ptrs()];
^
/usr/local/include/pybind11/detail/common.h:621:49: error: unknown type name 'type_info'; did you mean 'std::type_info'?
value_and_holder get_value_and_holder(const type_info *find_type = nullptr,
^~~~~~~~~
std::type_info
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/typeinfo:276:67: note: 'std::type_info' declared here
class _LIBCPP_EXCEPTION_ABI _LIBCPP_TYPE_INFO_VTABLE_POINTER_AUTH type_info
^
In file included from _re2.cc:11:
In file included from /usr/local/include/pybind11/pybind11.h:13:
In file included from /usr/local/include/pybind11/detail/class.h:12:
In file included from /usr/local/include/pybind11/detail/../attr.h:13:
/usr/local/include/pybind11/detail/common.h:625:12: error: unknown type name 'constexpr'
static constexpr uint8_t status_holder_constructed = 1;
^
/usr/local/include/pybind11/detail/common.h:625:29: error: expected ';' at end of declaration list
static constexpr uint8_t status_holder_constructed = 1;
^
;
/usr/local/include/pybind11/detail/common.h:626:12: error: unknown type name 'constexpr'
static constexpr uint8_t status_instance_registered = 2;
^
/usr/local/include/pybind11/detail/common.h:626:29: error: expected ';' at end of declaration list
static constexpr uint8_t status_instance_registered = 2;
^
;
/usr/local/include/pybind11/detail/common.h:640:21: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using enable_if_t = typename std::enable_if<B, T>::type;
^
/usr/local/include/pybind11/detail/common.h:642:23: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using conditional_t = typename std::conditional<B, T, F>::type;
^
/usr/local/include/pybind11/detail/common.h:644:21: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using remove_cv_t = typename std::remove_cv::type;
^
/usr/local/include/pybind11/detail/common.h:646:28: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using remove_reference_t = typename std::remove_reference::type;
^
/usr/local/include/pybind11/detail/common.h:655:18: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using type = remove_cv_t<remove_reference_t>;
^
/usr/local/include/pybind11/detail/common.h:655:50: error: a space is required between consecutive right angle brackets (use '> >')
using type = remove_cv_t<remove_reference_t>;
^~
> >
/usr/local/include/pybind11/detail/common.h:658:24: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using remove_cvref_t = typename remove_cvref::type;
^
/usr/local/include/pybind11/detail/common.h:663:32: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using is_same_ignoring_cvref = std::is_same<detail::remove_cvref_t, U>;
^
/usr/local/include/pybind11/detail/common.h:670:11: error: unknown type name 'size_t'
template <size_t...>
^
/usr/local/include/pybind11/detail/common.h:670:17: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
template <size_t...>
^
/usr/local/include/pybind11/detail/common.h:672:11: error: unknown type name 'size_t'
template <size_t N, size_t... S>
^
/usr/local/include/pybind11/detail/common.h:672:21: error: unknown type name 'size_t'
template <size_t N, size_t... S>
^
/usr/local/include/pybind11/detail/common.h:672:27: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
template <size_t N, size_t... S>
^
/usr/local/include/pybind11/detail/common.h:674:11: error: unknown type name 'size_t'
template <size_t... S>
^
/usr/local/include/pybind11/detail/common.h:674:17: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
template <size_t... S>
^
/usr/local/include/pybind11/detail/common.h:676:18: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using type = index_sequence<S...>;
^
/usr/local/include/pybind11/detail/common.h:678:11: error: unknown type name 'size_t'
template <size_t N>
^
/usr/local/include/pybind11/detail/common.h:679:29: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using make_index_sequence = typename make_index_sequence_impl::type;
^
/usr/local/include/pybind11/detail/common.h:683:32: error: expected template parameter
template <typename ISeq, size_t, bool...>
^
/usr/local/include/pybind11/detail/common.h:683:38: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
template <typename ISeq, size_t, bool...>
^
/usr/local/include/pybind11/detail/common.h:685:18: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using type = ISeq;
^
/usr/local/include/pybind11/detail/common.h:687:11: error: unknown type name 'size_t'
template <size_t... IPrev, size_t I, bool B, bool... Bs>
^
/usr/local/include/pybind11/detail/common.h:687:17: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
template <size_t... IPrev, size_t I, bool B, bool... Bs>
^
/usr/local/include/pybind11/detail/common.h:687:28: error: unknown type name 'size_t'
template <size_t... IPrev, size_t I, bool B, bool... Bs>
^
/usr/local/include/pybind11/detail/common.h:687:50: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
template <size_t... IPrev, size_t I, bool B, bool... Bs>
^
/usr/local/include/pybind11/detail/common.h:689:96: error: a space is required between consecutive right angle brackets (use '> >')
: select_indices_impl<conditional_t<B, index_sequence<IPrev..., I>, index_sequence<IPrev...>>,
^~
> >
/usr/local/include/pybind11/detail/common.h:692:15: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
template <bool... Bs>
^
/usr/local/include/pybind11/detail/common.h:693:24: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using select_indices = typename select_indices_impl<index_sequence<>, 0, Bs...>::type;
^
/usr/local/include/pybind11/detail/common.h:697:23: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using bool_constant = std::integral_constant<bool, B>;
^
/usr/local/include/pybind11/detail/common.h:708:19: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
template <typename...>
^
/usr/local/include/pybind11/detail/common.h:710:18: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using type = void;
^
/usr/local/include/pybind11/detail/common.h:712:19: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
template <typename... Ts>
^
/usr/local/include/pybind11/detail/common.h:713:16: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using void_t = typename void_t_impl<Ts...>::type;
^
/usr/local/include/pybind11/detail/common.h:723:15: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
template <bool...>
^
/usr/local/include/pybind11/detail/common.h:725:16: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
template <class... Ts>
^
/usr/local/include/pybind11/detail/common.h:726:16: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using all_of = std::is_same<bools<Ts::value..., true>, bools<true, Ts::value...>>;
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
30 warnings and 20 errors generated.
error: command '/usr/bin/clang' failed with exit code 1
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for google-re2
Failed to build google-re2
ERROR: Could not build wheels for google-re2, which is required to install pyproject.toml-based projects

I am running into a similar error related to apache-airflow installation. Using python 3.8.13 and MacOS Venture version 13.4.1. The errors are below:

  ERROR: Command errored out with exit status 1:
   command: /Users/guofei/anaconda3/envs/prompt/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/rk/nnl9yhm55kb6325ckffkn6hw0000gn/T/pip-install-1_b8itje/google-re2_b297da36bcc741899b98b7b86ffa2c37/setup.py'"'"'; __file__='"'"'/private/var/folders/rk/nnl9yhm55kb6325ckffkn6hw0000gn/T/pip-install-1_b8itje/google-re2_b297da36bcc741899b98b7b86ffa2c37/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/rk/nnl9yhm55kb6325ckffkn6hw0000gn/T/pip-wheel-w6frkjwq
       cwd: /private/var/folders/rk/nnl9yhm55kb6325ckffkn6hw0000gn/T/pip-install-1_b8itje/google-re2_b297da36bcc741899b98b7b86ffa2c37/
  Complete output (177 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.macosx-10.9-x86_64-cpython-38
  copying re2.py -> build/lib.macosx-10.9-x86_64-cpython-38
  running build_ext
  building '_re2' extension
  creating build/temp.macosx-10.9-x86_64-cpython-38
  gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/guofei/anaconda3/envs/prompt/include -arch x86_64 -I/Users/guofei/anaconda3/envs/prompt/include -arch x86_64 -I/Users/guofei/anaconda3/envs/prompt/include/python3.8 -c _re2.cc -o build/temp.macosx-10.9-x86_64-cpython-38/_re2.o -fvisibility=hidden
  In file included from _re2.cc:11:
  In file included from /usr/local/include/pybind11/pybind11.h:13:
  In file included from /usr/local/include/pybind11/detail/class.h:12:
  In file included from /usr/local/include/pybind11/detail/../attr.h:13:
  /usr/local/include/pybind11/detail/common.h:475:17: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
  using ssize_t = Py_ssize_t;
                  ^
  /usr/local/include/pybind11/detail/common.h:476:16: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
  using size_t = std::size_t;
                 ^
  /usr/local/include/pybind11/detail/common.h:485:6: warning: scoped enumerations are a C++11 extension [-Wc++11-extensions]
  enum class return_value_policy : uint8_t {
       ^
  /usr/local/include/pybind11/detail/common.h:538:15: error: unknown type name 'constexpr'
  inline static constexpr int log2(size_t n, int k = 0) {
                ^
  /usr/local/include/pybind11/detail/common.h:543:15: error: unknown type name 'constexpr'
  inline static constexpr size_t size_in_ptrs(size_t s) {
                ^
  /usr/local/include/pybind11/detail/common.h:543:1: warning: inline variables are a C++17 extension [-Wc++17-extensions]
  inline static constexpr size_t size_in_ptrs(size_t s) {
  ^
  /usr/local/include/pybind11/detail/common.h:543:31: error: expected ';' after top level declarator
  inline static constexpr size_t size_in_ptrs(size_t s) {
                                ^
                                ;
  /usr/local/include/pybind11/detail/common.h:573:39: error: use of undeclared identifier 'instance_simple_holder_in_ptrs'
          void *simple_value_holder[1 + instance_simple_holder_in_ptrs()];
                                        ^
  /usr/local/include/pybind11/detail/common.h:621:49: error: unknown type name 'type_info'; did you mean 'std::type_info'?
      value_and_holder get_value_and_holder(const type_info *find_type = nullptr,
                                                  ^~~~~~~~~
                                                  std::type_info
  /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/typeinfo:306:67: note: 'std::type_info' declared here
  class _LIBCPP_EXCEPTION_ABI _LIBCPP_TYPE_INFO_VTABLE_POINTER_AUTH type_info
                                                                    ^
  In file included from _re2.cc:11:
  In file included from /usr/local/include/pybind11/pybind11.h:13:
  In file included from /usr/local/include/pybind11/detail/class.h:12:
  In file included from /usr/local/include/pybind11/detail/../attr.h:13:
  /usr/local/include/pybind11/detail/common.h:625:12: error: unknown type name 'constexpr'
      static constexpr uint8_t status_holder_constructed = 1;
             ^
  /usr/local/include/pybind11/detail/common.h:625:29: error: expected ';' at end of declaration list
      static constexpr uint8_t status_holder_constructed = 1;
                              ^
                              ;
  /usr/local/include/pybind11/detail/common.h:626:12: error: unknown type name 'constexpr'
      static constexpr uint8_t status_instance_registered = 2;
             ^
  /usr/local/include/pybind11/detail/common.h:626:29: error: expected ';' at end of declaration list
      static constexpr uint8_t status_instance_registered = 2;
                              ^
                              ;
  /usr/local/include/pybind11/detail/common.h:640:21: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
  using enable_if_t = typename std::enable_if<B, T>::type;
                      ^
  /usr/local/include/pybind11/detail/common.h:642:23: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
  using conditional_t = typename std::conditional<B, T, F>::type;
                        ^
  /usr/local/include/pybind11/detail/common.h:644:21: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
  using remove_cv_t = typename std::remove_cv<T>::type;
                      ^
  /usr/local/include/pybind11/detail/common.h:646:28: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
  using remove_reference_t = typename std::remove_reference<T>::type;
                             ^
  /usr/local/include/pybind11/detail/common.h:655:18: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
      using type = remove_cv_t<remove_reference_t<T>>;
                   ^
  /usr/local/include/pybind11/detail/common.h:655:50: error: a space is required between consecutive right angle brackets (use '> >')
      using type = remove_cv_t<remove_reference_t<T>>;
                                                   ^~
                                                   > >
  /usr/local/include/pybind11/detail/common.h:658:24: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
  using remove_cvref_t = typename remove_cvref<T>::type;
                         ^
  /usr/local/include/pybind11/detail/common.h:663:32: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
  using is_same_ignoring_cvref = std::is_same<detail::remove_cvref_t<T>, U>;
                                 ^
  /usr/local/include/pybind11/detail/common.h:670:11: error: unknown type name 'size_t'
  template <size_t...>
            ^
  /usr/local/include/pybind11/detail/common.h:670:17: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
  template <size_t...>
                  ^
  /usr/local/include/pybind11/detail/common.h:672:11: error: unknown type name 'size_t'
  template <size_t N, size_t... S>
            ^
  /usr/local/include/pybind11/detail/common.h:672:21: error: unknown type name 'size_t'
  template <size_t N, size_t... S>
                      ^
  /usr/local/include/pybind11/detail/common.h:672:27: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
  template <size_t N, size_t... S>
                            ^
  /usr/local/include/pybind11/detail/common.h:674:11: error: unknown type name 'size_t'
  template <size_t... S>
            ^
  /usr/local/include/pybind11/detail/common.h:674:17: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
  template <size_t... S>
                  ^
  /usr/local/include/pybind11/detail/common.h:676:18: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
      using type = index_sequence<S...>;
                   ^
  /usr/local/include/pybind11/detail/common.h:678:11: error: unknown type name 'size_t'
  template <size_t N>
            ^
  /usr/local/include/pybind11/detail/common.h:679:29: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
  using make_index_sequence = typename make_index_sequence_impl<N>::type;
                              ^
  /usr/local/include/pybind11/detail/common.h:683:32: error: expected template parameter
  template <typename ISeq, size_t, bool...>
                                 ^
  /usr/local/include/pybind11/detail/common.h:683:38: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
  template <typename ISeq, size_t, bool...>
                                       ^
  /usr/local/include/pybind11/detail/common.h:685:18: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
      using type = ISeq;
                   ^
  /usr/local/include/pybind11/detail/common.h:687:11: error: unknown type name 'size_t'
  template <size_t... IPrev, size_t I, bool B, bool... Bs>
            ^
  /usr/local/include/pybind11/detail/common.h:687:17: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
  template <size_t... IPrev, size_t I, bool B, bool... Bs>
                  ^
  /usr/local/include/pybind11/detail/common.h:687:28: error: unknown type name 'size_t'
  template <size_t... IPrev, size_t I, bool B, bool... Bs>
                             ^
  /usr/local/include/pybind11/detail/common.h:687:50: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
  template <size_t... IPrev, size_t I, bool B, bool... Bs>
                                                   ^
  /usr/local/include/pybind11/detail/common.h:689:96: error: a space is required between consecutive right angle brackets (use '> >')
      : select_indices_impl<conditional_t<B, index_sequence<IPrev..., I>, index_sequence<IPrev...>>,
                                                                                                 ^~
                                                                                                 > >
  /usr/local/include/pybind11/detail/common.h:692:15: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
  template <bool... Bs>
                ^
  /usr/local/include/pybind11/detail/common.h:693:24: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
  using select_indices = typename select_indices_impl<index_sequence<>, 0, Bs...>::type;
                         ^
  /usr/local/include/pybind11/detail/common.h:697:23: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
  using bool_constant = std::integral_constant<bool, B>;
                        ^
  /usr/local/include/pybind11/detail/common.h:708:19: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
  template <typename...>
                    ^
  /usr/local/include/pybind11/detail/common.h:710:18: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
      using type = void;
                   ^
  /usr/local/include/pybind11/detail/common.h:712:19: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
  template <typename... Ts>
                    ^
  /usr/local/include/pybind11/detail/common.h:713:16: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
  using void_t = typename void_t_impl<Ts...>::type;
                 ^
  /usr/local/include/pybind11/detail/common.h:723:15: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
  template <bool...>
                ^
  /usr/local/include/pybind11/detail/common.h:725:16: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
  template <class... Ts>
                 ^
  /usr/local/include/pybind11/detail/common.h:726:16: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
  using all_of = std::is_same<bools<Ts::value..., true>, bools<true, Ts::value...>>;
                 ^
  fatal error: too many errors emitted, stopping now [-ferror-limit=]
  30 warnings and 20 errors generated.
  error: command '/usr/bin/gcc' failed with exit code 1
  ----------------------------------------
  ERROR: Failed building wheel for google-re2
  Running setup.py clean for google-re2
Failed to build google-re2
Installing collected packages: google-re2
    Running setup.py install for google-re2 ... error
    ERROR: Command errored out with exit status 1:
     command: /Users/guofei/anaconda3/envs/prompt/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/rk/nnl9yhm55kb6325ckffkn6hw0000gn/T/pip-install-1_b8itje/google-re2_b297da36bcc741899b98b7b86ffa2c37/setup.py'"'"'; __file__='"'"'/private/var/folders/rk/nnl9yhm55kb6325ckffkn6hw0000gn/T/pip-install-1_b8itje/google-re2_b297da36bcc741899b98b7b86ffa2c37/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/rk/nnl9yhm55kb6325ckffkn6hw0000gn/T/pip-record-oulkl8_0/install-record.txt --single-version-externally-managed --compile --install-headers /Users/guofei/anaconda3/envs/prompt/include/python3.8/google-re2
         cwd: /private/var/folders/rk/nnl9yhm55kb6325ckffkn6hw0000gn/T/pip-install-1_b8itje/google-re2_b297da36bcc741899b98b7b86ffa2c37/
    Complete output (190 lines):
    running install
    /Users/guofei/anaconda3/envs/prompt/lib/python3.8/site-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.
    !!

            ********************************************************************************
            Please avoid running ``setup.py`` directly.
            Instead, use pypa/build, pypa/installer or other
            standards-based tools.

            See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
            ********************************************************************************

    !!
      self.initialize_options()
    running build
    running build_py
    creating build
    creating build/lib.macosx-10.9-x86_64-cpython-38
    copying re2.py -> build/lib.macosx-10.9-x86_64-cpython-38
    running build_ext
    building '_re2' extension
    creating build/temp.macosx-10.9-x86_64-cpython-38
    gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/guofei/anaconda3/envs/prompt/include -arch x86_64 -I/Users/guofei/anaconda3/envs/prompt/include -arch x86_64 -I/Users/guofei/anaconda3/envs/prompt/include/python3.8 -c _re2.cc -o build/temp.macosx-10.9-x86_64-cpython-38/_re2.o -fvisibility=hidden
    In file included from _re2.cc:11:
    In file included from /usr/local/include/pybind11/pybind11.h:13:
    In file included from /usr/local/include/pybind11/detail/class.h:12:
    In file included from /usr/local/include/pybind11/detail/../attr.h:13:
    /usr/local/include/pybind11/detail/common.h:475:17: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
    using ssize_t = Py_ssize_t;
                    ^
    /usr/local/include/pybind11/detail/common.h:476:16: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
    using size_t = std::size_t;
                   ^
    /usr/local/include/pybind11/detail/common.h:485:6: warning: scoped enumerations are a C++11 extension [-Wc++11-extensions]
    enum class return_value_policy : uint8_t {
         ^
    /usr/local/include/pybind11/detail/common.h:538:15: error: unknown type name 'constexpr'
    inline static constexpr int log2(size_t n, int k = 0) {
                  ^
    /usr/local/include/pybind11/detail/common.h:543:15: error: unknown type name 'constexpr'
    inline static constexpr size_t size_in_ptrs(size_t s) {
                  ^
    /usr/local/include/pybind11/detail/common.h:543:1: warning: inline variables are a C++17 extension [-Wc++17-extensions]
    inline static constexpr size_t size_in_ptrs(size_t s) {
    ^
    /usr/local/include/pybind11/detail/common.h:543:31: error: expected ';' after top level declarator
    inline static constexpr size_t size_in_ptrs(size_t s) {
                                  ^
                                  ;
    /usr/local/include/pybind11/detail/common.h:573:39: error: use of undeclared identifier 'instance_simple_holder_in_ptrs'
            void *simple_value_holder[1 + instance_simple_holder_in_ptrs()];
                                          ^
    /usr/local/include/pybind11/detail/common.h:621:49: error: unknown type name 'type_info'; did you mean 'std::type_info'?
        value_and_holder get_value_and_holder(const type_info *find_type = nullptr,
                                                    ^~~~~~~~~
                                                    std::type_info
    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/typeinfo:306:67: note: 'std::type_info' declared here
    class _LIBCPP_EXCEPTION_ABI _LIBCPP_TYPE_INFO_VTABLE_POINTER_AUTH type_info
                                                                      ^
    In file included from _re2.cc:11:
    In file included from /usr/local/include/pybind11/pybind11.h:13:
    In file included from /usr/local/include/pybind11/detail/class.h:12:
    In file included from /usr/local/include/pybind11/detail/../attr.h:13:
    /usr/local/include/pybind11/detail/common.h:625:12: error: unknown type name 'constexpr'
        static constexpr uint8_t status_holder_constructed = 1;
               ^
    /usr/local/include/pybind11/detail/common.h:625:29: error: expected ';' at end of declaration list
        static constexpr uint8_t status_holder_constructed = 1;
                                ^
                                ;
    /usr/local/include/pybind11/detail/common.h:626:12: error: unknown type name 'constexpr'
        static constexpr uint8_t status_instance_registered = 2;
               ^
    /usr/local/include/pybind11/detail/common.h:626:29: error: expected ';' at end of declaration list
        static constexpr uint8_t status_instance_registered = 2;
                                ^
                                ;
    /usr/local/include/pybind11/detail/common.h:640:21: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
    using enable_if_t = typename std::enable_if<B, T>::type;
                        ^
    /usr/local/include/pybind11/detail/common.h:642:23: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
    using conditional_t = typename std::conditional<B, T, F>::type;
                          ^
    /usr/local/include/pybind11/detail/common.h:644:21: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
    using remove_cv_t = typename std::remove_cv<T>::type;
                        ^
    /usr/local/include/pybind11/detail/common.h:646:28: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
    using remove_reference_t = typename std::remove_reference<T>::type;
                               ^
    /usr/local/include/pybind11/detail/common.h:655:18: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
        using type = remove_cv_t<remove_reference_t<T>>;
                     ^
    /usr/local/include/pybind11/detail/common.h:655:50: error: a space is required between consecutive right angle brackets (use '> >')
        using type = remove_cv_t<remove_reference_t<T>>;
                                                     ^~
                                                     > >
    /usr/local/include/pybind11/detail/common.h:658:24: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
    using remove_cvref_t = typename remove_cvref<T>::type;
                           ^
    /usr/local/include/pybind11/detail/common.h:663:32: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
    using is_same_ignoring_cvref = std::is_same<detail::remove_cvref_t<T>, U>;
                                   ^
    /usr/local/include/pybind11/detail/common.h:670:11: error: unknown type name 'size_t'
    template <size_t...>
              ^
    /usr/local/include/pybind11/detail/common.h:670:17: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
    template <size_t...>
                    ^
    /usr/local/include/pybind11/detail/common.h:672:11: error: unknown type name 'size_t'
    template <size_t N, size_t... S>
              ^
    /usr/local/include/pybind11/detail/common.h:672:21: error: unknown type name 'size_t'
    template <size_t N, size_t... S>
                        ^
    /usr/local/include/pybind11/detail/common.h:672:27: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
    template <size_t N, size_t... S>
                              ^
    /usr/local/include/pybind11/detail/common.h:674:11: error: unknown type name 'size_t'
    template <size_t... S>
              ^
    /usr/local/include/pybind11/detail/common.h:674:17: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
    template <size_t... S>
                    ^
    /usr/local/include/pybind11/detail/common.h:676:18: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
        using type = index_sequence<S...>;
                     ^
    /usr/local/include/pybind11/detail/common.h:678:11: error: unknown type name 'size_t'
    template <size_t N>
              ^
    /usr/local/include/pybind11/detail/common.h:679:29: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
    using make_index_sequence = typename make_index_sequence_impl<N>::type;
                                ^
    /usr/local/include/pybind11/detail/common.h:683:32: error: expected template parameter
    template <typename ISeq, size_t, bool...>
                                   ^
    /usr/local/include/pybind11/detail/common.h:683:38: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
    template <typename ISeq, size_t, bool...>
                                         ^
    /usr/local/include/pybind11/detail/common.h:685:18: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
        using type = ISeq;
                     ^
    /usr/local/include/pybind11/detail/common.h:687:11: error: unknown type name 'size_t'
    template <size_t... IPrev, size_t I, bool B, bool... Bs>
              ^
    /usr/local/include/pybind11/detail/common.h:687:17: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
    template <size_t... IPrev, size_t I, bool B, bool... Bs>
                    ^
    /usr/local/include/pybind11/detail/common.h:687:28: error: unknown type name 'size_t'
    template <size_t... IPrev, size_t I, bool B, bool... Bs>
                               ^
    /usr/local/include/pybind11/detail/common.h:687:50: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
    template <size_t... IPrev, size_t I, bool B, bool... Bs>
                                                     ^
    /usr/local/include/pybind11/detail/common.h:689:96: error: a space is required between consecutive right angle brackets (use '> >')
        : select_indices_impl<conditional_t<B, index_sequence<IPrev..., I>, index_sequence<IPrev...>>,
                                                                                                   ^~
                                                                                                   > >
    /usr/local/include/pybind11/detail/common.h:692:15: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
    template <bool... Bs>
                  ^
    /usr/local/include/pybind11/detail/common.h:693:24: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
    using select_indices = typename select_indices_impl<index_sequence<>, 0, Bs...>::type;
                           ^
    /usr/local/include/pybind11/detail/common.h:697:23: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
    using bool_constant = std::integral_constant<bool, B>;
                          ^
    /usr/local/include/pybind11/detail/common.h:708:19: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
    template <typename...>
                      ^
    /usr/local/include/pybind11/detail/common.h:710:18: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
        using type = void;
                     ^
    /usr/local/include/pybind11/detail/common.h:712:19: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
    template <typename... Ts>
                      ^
    /usr/local/include/pybind11/detail/common.h:713:16: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
    using void_t = typename void_t_impl<Ts...>::type;
                   ^
    /usr/local/include/pybind11/detail/common.h:723:15: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
    template <bool...>
                  ^
    /usr/local/include/pybind11/detail/common.h:725:16: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
    template <class... Ts>
                   ^
    /usr/local/include/pybind11/detail/common.h:726:16: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
    using all_of = std::is_same<bools<Ts::value..., true>, bools<true, Ts::value...>>;
                   ^
    fatal error: too many errors emitted, stopping now [-ferror-limit=]
    30 warnings and 20 errors generated.
    error: command '/usr/bin/gcc' failed with exit code 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /Users/guofei/anaconda3/envs/prompt/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/rk/nnl9yhm55kb6325ckffkn6hw0000gn/T/pip-install-1_b8itje/google-re2_b297da36bcc741899b98b7b86ffa2c37/setup.py'"'"'; __file__='"'"'/private/var/folders/rk/nnl9yhm55kb6325ckffkn6hw0000gn/T/pip-install-1_b8itje/google-re2_b297da36bcc741899b98b7b86ffa2c37/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/rk/nnl9yhm55kb6325ckffkn6hw0000gn/T/pip-record-oulkl8_0/install-record.txt --single-version-externally-managed --compile --install-headers /Users/guofei/anaconda3/envs/prompt/include/python3.8/google-re2 Check the logs for full command output.

It remains unclear to me why the built wheels on PyPI aren't being used, but... It looks like the errors are due to the compilers defaulting to C++ language versions that are too old, so try running CFLAGS='-std=c++14' pip install google-re2 instead.

Hi Junyer,

Thanks for the swift response. Unfortunately, this does not resolve the install issue. See below:

(.v310) ZachAllard@Zachs-MacBook-Pro-2 ~ % CFLAGS='-std=c++14' pip install google-re2
Collecting google-re2
Using cached google-re2-1.0.tar.gz (9.8 kB)
Preparing metadata (setup.py) ... done
Building wheels for collected packages: google-re2
Building wheel for google-re2 (setup.py) ... error
error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [82 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-10.9-universal2-cpython-310
copying re2.py -> build/lib.macosx-10.9-universal2-cpython-310
running build_ext
building '_re2' extension
creating build/temp.macosx-10.9-universal2-cpython-310
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -std=c++14 -I/Users/ZachAllard/.v310/lib/python3.10/site-packages/pybind11/include -I/Users/ZachAllard/.v310/include -I/Library/Frameworks/Python.framework/Versions/3.10/include/python3.10 -c _re2.cc -o build/temp.macosx-10.9-universal2-cpython-310/_re2.o -fvisibility=hidden
In file included from _re2.cc:14:
In file included from /usr/local/include/re2/filtered_re2.h:29:
In file included from /usr/local/include/re2/re2.h:219:
In file included from /usr/local/include/absl/types/optional.h:39:
/usr/local/include/absl/utility/utility.h:164:12: error: no member named 'in_place_t' in namespace 'std'
using std::in_place_t;
~~~~~^
/usr/local/include/absl/utility/utility.h:165:12: error: no member named 'in_place' in namespace 'std'
using std::in_place;
~~~~~^
/usr/local/include/absl/utility/utility.h:181:12: error: no member named 'in_place_type' in namespace 'std'
using std::in_place_type;
~~~~~^
/usr/local/include/absl/utility/utility.h:182:12: error: no member named 'in_place_type_t' in namespace 'std'
using std::in_place_type_t;
~~~~~^
/usr/local/include/absl/utility/utility.h:198:12: error: no member named 'in_place_index' in namespace 'std'
using std::in_place_index;
~~~~~^
/usr/local/include/absl/utility/utility.h:199:12: error: no member named 'in_place_index_t' in namespace 'std'
using std::in_place_index_t;
~~~~~^
In file included from _re2.cc:14:
In file included from /usr/local/include/re2/filtered_re2.h:29:
In file included from /usr/local/include/re2/re2.h:219:
/usr/local/include/absl/types/optional.h:48:12: error: no member named 'optional' in namespace 'std'
using std::optional;
~~~~~^
/usr/local/include/absl/types/optional.h:49:12: error: no member named 'make_optional' in namespace 'std'
using std::make_optional;
~~~~~^
/usr/local/include/absl/types/optional.h:50:12: error: no member named 'nullopt_t' in namespace 'std'; did you mean 'nullptr_t'?
using std::nullopt_t;
~~~~~^~~~~~~~~
nullptr_t
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__nullptr:56:31: note: 'nullptr_t' declared here
typedef decltype(nullptr) nullptr_t;
^
In file included from _re2.cc:14:
In file included from /usr/local/include/re2/filtered_re2.h:29:
In file included from /usr/local/include/re2/re2.h:219:
/usr/local/include/absl/types/optional.h:51:12: error: no member named 'nullopt' in namespace 'std'
using std::nullopt;
~~~~~^
In file included from _re2.cc:14:
In file included from /usr/local/include/re2/filtered_re2.h:29:
/usr/local/include/re2/re2.h:835:46: error: no member named 'optional' in namespace 'absl'
template struct Parse3ary<absl::optional> : public Parse3ary {};
~~~~~~^
/usr/local/include/re2/re2.h:835:55: error: 'T' does not refer to a value
template struct Parse3ary<absl::optional> : public Parse3ary {};
^
/usr/local/include/re2/re2.h:835:20: note: declared here
template struct Parse3ary<absl::optional> : public Parse3ary {};
^
/usr/local/include/re2/re2.h:836:46: error: no member named 'optional' in namespace 'absl'
template struct Parse4ary<absl::optional> : public Parse4ary {};
~~~~~~^
/usr/local/include/re2/re2.h:836:55: error: 'T' does not refer to a value
template struct Parse4ary<absl::optional> : public Parse4ary {};
^
/usr/local/include/re2/re2.h:836:20: note: declared here
template struct Parse4ary<absl::optional> : public Parse4ary {};
^
/usr/local/include/re2/re2.h:839:45: error: no template named 'optional' in namespace 'absl'
bool Parse(const char* str, size_t n, absl::optional* dest) {
~~~~~~^
/usr/local/include/re2/re2.h:855:45: error: no template named 'optional' in namespace 'absl'
bool Parse(const char* str, size_t n, absl::optional* dest, int radix) {
~~~~~~^
16 errors generated.
error: command '/usr/bin/clang' failed with exit code 1
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for google-re2
Running setup.py clean for google-re2
Failed to build google-re2
ERROR: Could not build wheels for google-re2, which is required to install pyproject.toml-based projects

I don't know if this is relevant but when I check the c++ version this is what I'm seeing:

Apple clang version 12.0.0 (clang-1200.0.32.29)
Target: x86_64-apple-darwin19.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

I really don't understand why absl::optional<> is causing problems here, but okay, try running CFLAGS='-std=c++17' pip install google-re2 then? I wonder whether something weird has happened with ABSL_OPTION_USE_STD_OPTIONAL for you...

Update: I modified your command to CFLAGS='-std=c++17' pip install google-re2 and it installed!

Thanks for confirming! I wonder whether it's related to why Abseil as installed by Homebrew is currently built for C++17. 🤔

Hey, I am running into the same problem.
Like other users above, ultimately I would like to install Apache Airflow on my machine.
I'm running on macOS Ventura 13.4.1, and I'm simply setting up a conda environment with the following minimal environment.yml file.

name: project_name
channels:
  - conda-forge
dependencies:
  - python==3.9
  - pip
  - pip:
      - poetry
      - apache-airflow==2.6.3 --constraint "https://raw.githubusercontent.com/apache/airflow/constraints-2.6.3/constraints-3.9.txt"

Setting up the environment fails because pip errors out.
So I deleted the line with the Airflow install, created the environment and then tried to install google-re2 like so: pip install google-re2

I get the following error.

  Using cached google-re2-1.0.tar.gz (9.8 kB)
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: google-re2
  Building wheel for google-re2 (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [15 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.macosx-10.9-x86_64-cpython-39
      copying re2.py -> build/lib.macosx-10.9-x86_64-cpython-39
      running build_ext
      building '_re2' extension
      creating build/temp.macosx-10.9-x86_64-cpython-39
      clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /Users/tejas/opt/anaconda3/envs/project_name/include -fPIC -O2 -isystem /Users/tejas/opt/anaconda3/envs/project_name/include -I/Users/tejas/opt/anaconda3/envs/project_name/include/python3.9 -c _re2.cc -o build/temp.macosx-10.9-x86_64-cpython-39/_re2.o -fvisibility=hidden
      _re2.cc:11:10: fatal error: 'pybind11/pybind11.h' file not found
      #include <pybind11/pybind11.h>
               ^~~~~~~~~~~~~~~~~~~~~
      1 error generated.
      error: command '/usr/bin/clang' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for google-re2
  Running setup.py clean for google-re2
Failed to build google-re2
ERROR: Could not build wheels for google-re2, which is required to install pyproject.toml-based projects

I also tried the suggestions above to set the CFLAGS, used both these commands:
CFLAGS='-std=c++14' pip install google-re2 and CFLAGS='-std=c++17' pip install google-re2.
Still no luck. I get the same error as above.

An update:
Picking a slightly old Airflow version seems to resolve this issue.
Instead of going for the latest stable release which is 2.6.3, using
- apache-airflow==2.6.2 --constraint "https://raw.githubusercontent.com/apache/airflow/constraints-2.6.2/constraints-3.9.txt" has let me install Airflow. But that is simply because 2.6.2 doesn't depend on google-re2.
The issue of being able to install google-re2 through pip still remains unsolved.

This error is quite conclusive:

      _re2.cc:11:10: fatal error: 'pybind11/pybind11.h' file not found
      #include <pybind11/pybind11.h>
               ^~~~~~~~~~~~~~~~~~~~~
      1 error generated.

You will need to install pybind11 on your system.

The reason for "why the built wheels on PyPI aren't being used" turned out to be that only Big Sur (11) and Monterey (12) are configured in the build matrix. Ventura (13) is currently still in beta for GitHub-hosted runners, but I'm going to add that too.

Everyone who chimed in should be covered by that or else by the digging done previously, I think, so I'm going to close this.

Hi! Like the above commenters, I'm running into issues installing google-re2 on Mac, as a dependency for installing apache-airflow. I've performed all the above recommendations and upon running CFLAGS='-std=c++17' pip install google-re2, I encountered the following exception:

Collecting google-re2
  Using cached google-re2-1.1.tar.gz (10 kB)
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: google-re2
  Building wheel for google-re2 (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [15 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.macosx-10.9-x86_64-cpython-38
      copying re2.py -> build/lib.macosx-10.9-x86_64-cpython-38
      running build_ext
      building '_re2' extension
      creating build/temp.macosx-10.9-x86_64-cpython-38
      gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/benjaminbole/miniconda3/envs/dxp_data/include -arch x86_64 -I/Users/benjaminbole/miniconda3/envs/dxp_data/include -arch x86_64 -std=c++17 -I/Users/benjaminbole/miniconda3/envs/dxp_data/lib/python3.8/site-packages/pybind11/include -I/Users/benjaminbole/miniconda3/envs/dxp_data/include/python3.8 -c _re2.cc -o build/temp.macosx-10.9-x86_64-cpython-38/_re2.o -fvisibility=hidden
      _re2.cc:13:10: fatal error: 'absl/strings/string_view.h' file not found
      #include "absl/strings/string_view.h"
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
      1 error generated.
      error: command '/usr/bin/gcc' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for google-re2
  Running setup.py clean for google-re2
Failed to build google-re2
ERROR: Could not build wheels for google-re2, which is required to install pyproject.toml-based projects

I went to install absl by running pip install absl-py thinking it might be able to clear up the dependency issue, and no dice. I also thought it might be an issue with the tar my pip had cached, so I attempted running CFLAGS='-std=c++17' pip install google-re2 --no-cache-dir, and again, no dice.

Any recommendations for how to resolve the absl dependency issue?

CFLAGS='-std=c++17' pip install google-re2==1.0 is the simplest thing that could possibly work, I think, inasmuch as 1.0 predates the Abseil dependency. (You could install Abseil as in the C++ libraries, but _re2.cc just uses absl::string_view and, ironically enough, that's std::string_view by default as of C++17, so I can imagine why you might not want to bother.)

CFLAGS='-std=c++17' pip install google-re2==1.0 is the simplest thing that could possibly work, I think, inasmuch as 1.0 predates the Abseil dependency. (You could install Abseil as in the C++ libraries, but _re2.cc just uses absl::string_view and, ironically enough, that's std::string_view by default as of C++17, so I can imagine why you might not want to bother.)

Still ran into issues after running CFLAGS='-std=c++17' pip install google-re2==1.0:

Building wheels for collected packages: google-re2
  Building wheel for google-re2 (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [15 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.macosx-10.9-x86_64-cpython-38
      copying re2.py -> build/lib.macosx-10.9-x86_64-cpython-38
      running build_ext
      building '_re2' extension
      creating build/temp.macosx-10.9-x86_64-cpython-38
      gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/benjaminbole/miniconda3/envs/dxp_data/include -arch x86_64 -I/Users/benjaminbole/miniconda3/envs/dxp_data/include -arch x86_64 -std=c++17 -I/Users/benjaminbole/miniconda3/envs/dxp_data/lib/python3.8/site-packages/pybind11/include -I/Users/benjaminbole/miniconda3/envs/dxp_data/include/python3.8 -c _re2.cc -o build/temp.macosx-10.9-x86_64-cpython-38/_re2.o -fvisibility=hidden
      _re2.cc:14:10: fatal error: 're2/filtered_re2.h' file not found
      #include "re2/filtered_re2.h"
               ^~~~~~~~~~~~~~~~~~~~
      1 error generated.
      error: command '/usr/bin/gcc' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for google-re2
  Running setup.py clean for google-re2
Failed to build google-re2
ERROR: Could not build wheels for google-re2, which is required to install pyproject.toml-based projects

I decided to go back to the original command, CFLAGS='-std=c++17' pip install google-re2 and perform some brew installs on the dependencies. After running both brew install abseil and brew install re2, I was able to successfully build the google-re2 library.

Ahh! Mea culpa, I assumed that an older version of RE2 (i.e. from before 2023-06-01) was already installed on the system. :(