rapidfuzz / RapidFuzz

Rapid fuzzy string matching in Python using various string metrics

Home Page:https://rapidfuzz.github.io/RapidFuzz/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fail to install on PyPy 7.3.9 (Python 3.9.12)

mujahidfa opened this issue · comments

I got the following error when trying to install rapidfuzz on PyPy 7.3 (Python 3.9.12) on a RHEL 8.6 (redhat-release-8.6-0.1.el8.x86_64) machine:

> pip install rapidfuzz
Collecting rapidfuzz
  Using cached rapidfuzz-2.0.11-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.7 MB)
Collecting jarowinkler<1.1.0,>=1.0.2
  Using cached jarowinkler-1.0.2.tar.gz (75 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: jarowinkler
  Building wheel for jarowinkler (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Building wheel for jarowinkler (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [96 lines of output]
      Not searching for unused variables given on the command line.
      -- The C compiler identification is GNU 8.5.0
      -- Detecting C compiler ABI info
      -- Detecting C compiler ABI info - done
      -- Check for working C compiler: /usr/bin/cc - skipped
      -- Detecting C compile features
      -- Detecting C compile features - done
      -- The CXX compiler identification is unknown
      CMake Error at CMakeLists.txt:4 (ENABLE_LANGUAGE):
        No CMAKE_CXX_COMPILER could be found.
      
        Tell CMake where to find the compiler by setting either the environment
        variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
        to the compiler, or to the compiler name if it is in the PATH.
      
      
      -- Configuring incomplete, errors occurred!
      See also "/tmp/pip-install-qfw2vk3d/jarowinkler_0d6ed17760354586ad9c5281463ebaff/_cmake_test_compile/build/CMakeFiles/CMakeOutput.log".
      See also "/tmp/pip-install-qfw2vk3d/jarowinkler_0d6ed17760354586ad9c5281463ebaff/_cmake_test_compile/build/CMakeFiles/CMakeError.log".
      Not searching for unused variables given on the command line.
      -- The C compiler identification is GNU 8.5.0
      -- Detecting C compiler ABI info
      -- Detecting C compiler ABI info - done
      -- Check for working C compiler: /usr/bin/cc - skipped
      -- Detecting C compile features
      -- Detecting C compile features - done
      -- The CXX compiler identification is unknown
      CMake Error at CMakeLists.txt:4 (ENABLE_LANGUAGE):
        No CMAKE_CXX_COMPILER could be found.
      
        Tell CMake where to find the compiler by setting either the environment
        variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
        to the compiler, or to the compiler name if it is in the PATH.
      
      
      -- Configuring incomplete, errors occurred!
      See also "/tmp/pip-install-qfw2vk3d/jarowinkler_0d6ed17760354586ad9c5281463ebaff/_cmake_test_compile/build/CMakeFiles/CMakeOutput.log".
      See also "/tmp/pip-install-qfw2vk3d/jarowinkler_0d6ed17760354586ad9c5281463ebaff/_cmake_test_compile/build/CMakeFiles/CMakeError.log".
      
      
      --------------------------------------------------------------------------------
      -- Trying "Ninja" generator
      --------------------------------
      ---------------------------
      ----------------------
      -----------------
      ------------
      -------
      --
      --
      -------
      ------------
      -----------------
      ----------------------
      ---------------------------
      --------------------------------
      -- Trying "Ninja" generator - failure
      --------------------------------------------------------------------------------
      
      
      
      --------------------------------------------------------------------------------
      -- Trying "Unix Makefiles" generator
      --------------------------------
      ---------------------------
      ----------------------
      -----------------
      ------------
      -------
      --
      --
      -------
      ------------
      -----------------
      ----------------------
      ---------------------------
      --------------------------------
      -- Trying "Unix Makefiles" generator - failure
      --------------------------------------------------------------------------------
      
      ********************************************************************************
      scikit-build could not get a working generator for your system. Aborting build.
      
      Building Linux wheels for Python 3.9 requires a compiler (e.g gcc).
      But scikit-build does *NOT* know how to install it on rhel
      
      To build compliant wheels, consider using the manylinux system described in PEP-513.
      Get it with "dockcross/manylinux-x64" docker image:
      
        https://github.com/dockcross/dockcross#readme
      
      For more details, please refer to scikit-build documentation:
      
        http://scikit-build.readthedocs.io/en/latest/generators.html#linux
      
      ********************************************************************************
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for jarowinkler
Failed to build jarowinkler
ERROR: Could not build wheels for jarowinkler, which is required to install pyproject.toml-based projects

I was wondering if this is an issue with PyPy or rapidfuzz itself?

I did not provide wheels for the jarowinkler package on pypy3.9 yet and you appear to have no c++ compiler available to build from source. I released a new version of the package, which provides these wheels. So you the installation should now work.

Wow, I didn't expect a response and a fix that fast. Thank you @maxbachmann! I tested v2.0.13 and it works perfectly on the above machine.