wharris/esmre

Pip install esmre failed in python ver. 3.12.3 with Windows 10

Opened this issue · 0 comments

D:\Source\Python\Packages_312>pip install esmre
Collecting esmre
Using cached esmre-1.0.1.tar.gz (56 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [56 lines of output]
D:\Python3\Lib\site-packages\Cython\Compiler\Main.py:381: FutureWarning: Cython directive 'language_level' not set, using '3str' for now (Py3). This has changed from earlier releases! File: C:\Users\chiang\AppData\Local\Temp\pip-install-xyaaiesy\esmre_0ecab97529f34f98a1fed05278744bd3\src\esm.pyx
tree = Parsing.p_module(s, pxd, full_module_name)

  Error compiling Cython file:
  ------------------------------------------------------------
  ...
          self._index = aho_corasick.ac_index_new()
          if self._index is NULL:
              raise MemoryError()
 
      def __dealloc__(self):
          aho_corasick.ac_index_free(self._index, decref_result_object)
                                                  ^
  ------------------------------------------------------------
 
  src\esm.pyx:28:48: Cannot assign type 'ac_error_code (void *, void *) except *' to 'ac_free_function' (alias of 'ac_error_code (*)(void *, void *) noexcept'). Exception values are incompatible. Suggest adding 'noexcept' to the type of 'decref_result_object'.    
 
  Error compiling Cython file:
  ------------------------------------------------------------
  ...
          result_list = []
 
          status = aho_corasick.ac_index_query_cb(self._index,
                                            phrase,
                                            len(phrase),
                                            append_result,
                                            ^
  ------------------------------------------------------------
 
  src\esm.pyx:64:42: Cannot assign type 'ac_error_code (void *, ac_result *) except *' to 'ac_result_callback' (alias of 'ac_error_code (*)(void *, ac_result *) noexcept'). Exception values are incompatible. Suggest adding 'noexcept' to the type of 'append_result'.
  Compiling src/esm.pyx because it changed.
  [1/1] Cythonizing src/esm.pyx
  Traceback (most recent call last):
    File "D:\Python3\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
      main()
    File "D:\Python3\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "D:\Python3\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 118, in get_requires_for_build_wheel
      return hook(config_settings)
             ^^^^^^^^^^^^^^^^^^^^^
    File "D:\Python3\Lib\site-packages\setuptools\build_meta.py", line 325, in get_requires_for_build_wheel
      return self._get_build_requires(config_settings, requirements=['wheel'])
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "D:\Python3\Lib\site-packages\setuptools\build_meta.py", line 295, in _get_build_requires
      self.run_setup()
    File "D:\Python3\Lib\site-packages\setuptools\build_meta.py", line 487, in run_setup
      super().run_setup(setup_script=setup_script)
    File "D:\Python3\Lib\site-packages\setuptools\build_meta.py", line 311, in run_setup
      exec(code, locals())
    File "<string>", line 53, in <module>
    File "D:\Python3\Lib\site-packages\Cython\Build\Dependencies.py", line 1154, in cythonize
      cythonize_one(*args)
    File "D:\Python3\Lib\site-packages\Cython\Build\Dependencies.py", line 1321, in cythonize_one
      raise CompileError(None, pyx_file)
  Cython.Compiler.Errors.CompileError: src/esm.pyx
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.