python-hyperscan: Python3.9 installation errors

Hi, I’m facing the following error when trying to install hyperscan==0.1.5 from pip (I will give more context below).

  ERROR: Command errored out with exit status 1:
   command: /usr/local/bin/python /usr/local/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py build_wheel /tmp/tmp9ybf83mg
       cwd: /tmp/pip-install-abs2u1co/hyperscan_e483bc77b1a7411d9142094e042fbd7d
  Complete output (25 lines):
  A setup.py file already exists. Using it.
  Traceback (most recent call last):
    File "/tmp/pip-install-abs2u1co/hyperscan_e483bc77b1a7411d9142094e042fbd7d/setup.py", line 2, in <module>
      from setuptools import setup
  ModuleNotFoundError: No module named 'setuptools'
  Traceback (most recent call last):
    File "/usr/local/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py", line 280, in <module>
      main()
    File "/usr/local/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py", line 263, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "/usr/local/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py", line 204, in build_wheel
      return _build_backend().build_wheel(wheel_directory, config_settings,
    File "/tmp/pip-build-env-pdwain6d/overlay/lib/python3.9/site-packages/poetry/core/masonry/api.py", line 57, in build_wheel
      return unicode(WheelBuilder.make_in(poetry, Path(wheel_directory)))
    File "/tmp/pip-build-env-pdwain6d/overlay/lib/python3.9/site-packages/poetry/core/masonry/builders/wheel.py", line 59, in make_in
      wb.build()
    File "/tmp/pip-build-env-pdwain6d/overlay/lib/python3.9/site-packages/poetry/core/masonry/builders/wheel.py", line 89, in build
      self._build(zip_file)
    File "/tmp/pip-build-env-pdwain6d/overlay/lib/python3.9/site-packages/poetry/core/masonry/builders/wheel.py", line 121, in _build
      self._run_build_command(setup)
    File "/tmp/pip-build-env-pdwain6d/overlay/lib/python3.9/site-packages/poetry/core/masonry/builders/wheel.py", line 149, in _run_build_command
      subprocess.check_call(
    File "/usr/local/lib/python3.9/subprocess.py", line 373, in check_call
      raise CalledProcessError(retcode, cmd)
  subprocess.CalledProcessError: Command '['/usr/local/bin/python', '/tmp/pip-install-abs2u1co/hyperscan_e483bc77b1a7411d9142094e042fbd7d/setup.py', 'build', '-b', '/tmp/pip-install-abs2u1co/hyperscan_e483bc77b1a7411d9142094e042fbd7d/build']' returned non-zero exit status 1.
  ----------------------------------------
  ERROR: Failed building wheel for hyperscan
Failed to build hyperscan
ERROR: Could not build wheels for hyperscan which use PEP 517 and cannot be installed directly

I’m using docker, image python:3.9-slim-buster. I have already installed libhyperscan5 (and all the other dependencies needed) and made sure that setuptools is installed and upgraded (I have v53.0.0).

I have made a test also for hyperscan==0.2.0 and no errors are raised during the installation. Yet, every time I import hyperscan in my code, I get the same error described in #28

root@08e7ef3102e3:~# python -c "import hyperscan"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/local/lib/python3.9/site-packages/hyperscan/__init__.py", line 5, in <module>
    from hyperscan._hyperscan import *
ImportError: /usr/local/lib/python3.9/site-packages/hyperscan/_hyperscan.cpython-39-x86_64-linux-gnu.so: undefined symbol: hs_compile_lit_multi

Nevertheless, and it is a big question mark to me, the setup MacOS (11.2) + python3.9 + hyperscan library installed from brew + pip install hyperscan==0.2.0 perfectly works

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 27 (7 by maintainers)

Most upvoted comments

Only the 0.3 version has binaries included (I tried with ubuntu and works). Previous versions like v0.2 require to install libhyperscan (on ubuntu it’s libhyperscan5)