danioxoli / HotSpotAnalysis_Plugin

A QGIS plugin for hotspot analysis
GNU General Public License v3.0
55 stars 12 forks source link

Mac - QGIS 3.22 "error when calling its classFactory() method" #86

Open emilyroutman opened 1 year ago

emilyroutman commented 1 year ago

Hi there! I've been browsing all of the resolved issues on here to try to figure out what to do here to get this plugin to work. Thank you so much in advance! Here's what I get when I try to load the plugin:

Couldn't load plugin 'HotspotAnalysis' due to an error when calling its classFactory() method

numba.core.errors.TypingError: Failed in nopython mode pipeline (step: nopython mode backend) Failed in nopython mode pipeline (step: nopython frontend) No implementation of function Function(.run_quicksort at 0x16d37ba60>) found for signature: >>> run_quicksort(array(float64, 1d, A)) There are 2 candidate implementations: - Of which 2 did not match due to: Overload in function 'register_jitable..wrap..ov_wrap': File: numba/core/extending.py: Line 142. With argument(s): '(array(float64, 1d, A))': Rejected as the implementation raised a specific error: UnsupportedError: Failed in nopython mode pipeline (step: analyzing bytecode) Use of unsupported opcode (LOAD_ASSERTION_ERROR) found File "Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/numba-0.50.1-py3.9-macosx-10.13.0-x86_64.egg/numba/misc/quicksort.py", line 180: def run_quicksort(A): while high - low >= SMALL_QUICKSORT: assert n .run_quicksort at 0x16d37ba60>) During: typing of call at /Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/numba-0.50.1-py3.9-macosx-10.13.0-x86_64.egg/numba/np/arrayobj.py (5007) File "Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/numba-0.50.1-py3.9-macosx-10.13.0-x86_64.egg/numba/np/arrayobj.py", line 5007: def array_sort_impl(arr): # Note we clobber the return value sort_func(arr) ^ During: lowering "$16call_method.6 = call $14load_method.5(func=$14load_method.5, args=[], kws=(), vararg=None)" at /Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/quantecon/random/utilities.py (85) Traceback (most recent call last): File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 423, in _startPlugin plugins[packageName] = package.classFactory(iface) File "/Users/emilyroutman/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/HotspotAnalysis/init.py", line 34, in classFactory from .hotspot_analysis import HotspotAnalysis File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 888, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "/Users/emilyroutman/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/HotspotAnalysis/hotspot_analysis.py", line 39, in from pysal.explore.esda.getisord import * File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 888, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/pysal/explore/init.py", line 2, in import giddy File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 888, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/giddy/init.py", line 11, in from . import ergodic File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 888, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/giddy/ergodic.py", line 10, in import quantecon as qe File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 888, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/quantecon/init.py", line 15, in from . import game_theory File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 888, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/quantecon/game_theory/init.py", line 8, in from .random import ( File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 888, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/quantecon/game_theory/random.py", line 10, in from ..random import probvec File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 888, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/quantecon/random/init.py", line 17, in from .utilities import probvec, sample_without_replacement, draw File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 888, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/quantecon/random/utilities.py", line 91, in _probvec_parallel = guvectorize( File "/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/numba-0.50.1-py3.9-macosx-10.13.0-x86_64.egg/numba/np/ufunc/decorators.py", line 179, in wrap guvec.add(fty) File "/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/numba-0.50.1-py3.9-macosx-10.13.0-x86_64.egg/numba/np/ufunc/ufuncbuilder.py", line 211, in add cres, args, return_type = _compile_element_wise_function( File "/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/numba-0.50.1-py3.9-macosx-10.13.0-x86_64.egg/numba/np/ufunc/ufuncbuilder.py", line 143, in _compile_element_wise_function cres = nb_func.compile(sig, targetoptions) File "/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/numba-0.50.1-py3.9-macosx-10.13.0-x86_64.egg/numba/np/ufunc/ufuncbuilder.py", line 92, in compile return self._compile_core(sig, flags, locals) File "/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/numba-0.50.1-py3.9-macosx-10.13.0-x86_64.egg/numba/np/ufunc/ufuncbuilder.py", line 124, in _compile_core cres = compiler.compile_extra(typingctx, targetctx, File "/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/numba-0.50.1-py3.9-macosx-10.13.0-x86_64.egg/numba/core/compiler.py", line 603, in compile_extra return pipeline.compile_extra(func) File "/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/numba-0.50.1-py3.9-macosx-10.13.0-x86_64.egg/numba/core/compiler.py", line 339, in compile_extra return self._compile_bytecode() File "/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/numba-0.50.1-py3.9-macosx-10.13.0-x86_64.egg/numba/core/compiler.py", line 401, in _compile_bytecode return self._compile_core() File "/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/numba-0.50.1-py3.9-macosx-10.13.0-x86_64.egg/numba/core/compiler.py", line 381, in _compile_core raise e File "/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/numba-0.50.1-py3.9-macosx-10.13.0-x86_64.egg/numba/core/compiler.py", line 372, in _compile_core pm.run(self.state) File "/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/numba-0.50.1-py3.9-macosx-10.13.0-x86_64.egg/numba/core/compiler_machinery.py", line 341, in run raise patched_exception File "/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/numba-0.50.1-py3.9-macosx-10.13.0-x86_64.egg/numba/core/compiler_machinery.py", line 332, in run self._runPass(idx, pass_inst, state) File "/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/numba-0.50.1-py3.9-macosx-10.13.0-x86_64.egg/numba/core/compiler_lock.py", line 32, in _acquire_compile_lock return func(*args, *kwargs) File "/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/numba-0.50.1-py3.9-macosx-10.13.0-x86_64.egg/numba/core/compiler_machinery.py", line 291, in _runPass mutated |= check(pss.run_pass, internal_state) File "/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/numba-0.50.1-py3.9-macosx-10.13.0-x86_64.egg/numba/core/compiler_machinery.py", line 264, in check mangled = func(compiler_state) File "/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/numba-0.50.1-py3.9-macosx-10.13.0-x86_64.egg/numba/core/typed_passes.py", line 442, in run_pass NativeLowering().run_pass(state) File "/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/numba-0.50.1-py3.9-macosx-10.13.0-x86_64.egg/numba/core/typed_passes.py", line 370, in run_pass lower.lower() File "/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/numba-0.50.1-py3.9-macosx-10.13.0-x86_64.egg/numba/core/lowering.py", line 179, in lower self.lower_normal_function(self.fndesc) File "/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/numba-0.50.1-py3.9-macosx-10.13.0-x86_64.egg/numba/core/lowering.py", line 233, in lower_normal_function entry_block_tail = self.lower_function_body() File "/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/numba-0.50.1-py3.9-macosx-10.13.0-x86_64.egg/numba/core/lowering.py", line 259, in lower_function_body self.lower_block(block) File "/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/numba-0.50.1-py3.9-macosx-10.13.0-x86_64.egg/numba/core/lowering.py", line 273, in lower_block self.lower_inst(inst) File "/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/numba-0.50.1-py3.9-macosx-10.13.0-x86_64.egg/numba/core/lowering.py", line 370, in lower_inst val = self.lower_assign(ty, inst) File "/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/numba-0.50.1-py3.9-macosx-10.13.0-x86_64.egg/numba/core/lowering.py", line 544, in lower_assign return self.lower_expr(ty, value) File "/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/numba-0.50.1-py3.9-macosx-10.13.0-x86_64.egg/numba/core/lowering.py", line 1070, in lower_expr res = self.lower_call(resty, expr) File "/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/numba-0.50.1-py3.9-macosx-10.13.0-x86_64.egg/numba/core/lowering.py", line 806, in lower_call res = self._lower_call_normal(fnty, expr, signature) File "/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/numba-0.50.1-py3.9-macosx-10.13.0-x86_64.egg/numba/core/lowering.py", line 1041, in _lower_call_normal res = impl(self.builder, argvals, self.loc) File "/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/numba-0.50.1-py3.9-macosx-10.13.0-x86_64.egg/numba/core/base.py", line 1164, in call res = self._imp(self._context, builder, self._sig, args, loc=loc) File "/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/numba-0.50.1-py3.9-macosx-10.13.0-x86_64.egg/numba/core/base.py", line 1194, in wrapper return fn(args, kwargs) File "/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/numba-0.50.1-py3.9-macosx-10.13.0-x86_64.egg/numba/np/arrayobj.py", line 5009, in array_sort return context.compile_internal(builder, array_sort_impl, sig, args) File "/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/numba-0.50.1-py3.9-macosx-10.13.0-x86_64.egg/numba/core/base.py", line 884, in compile_internal cres = self.compile_subroutine(builder, impl, sig, locals) File "/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/numba-0.50.1-py3.9-macosx-10.13.0-x86_64.egg/numba/core/base.py", line 869, in compile_subroutine cres = self._compile_subroutine_no_cache(builder, impl, sig, File "/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/numba-0.50.1-py3.9-macosx-10.13.0-x86_64.egg/numba/core/base.py", line 840, in _compile_subroutine_no_cache cres = compiler.compile_internal(self.typing_context, self, File "/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/numba-0.50.1-py3.9-macosx-10.13.0-x86_64.egg/numba/core/compiler.py", line 677, in compile_internal return pipeline.compile_extra(func) File "/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/numba-0.50.1-py3.9-macosx-10.13.0-x86_64.egg/numba/core/compiler.py", line 339, in compile_extra return self._compile_bytecode() File "/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/numba-0.50.1-py3.9-macosx-10.13.0-x86_64.egg/numba/core/compiler.py", line 401, in _compile_bytecode return self._compile_core() File "/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/numba-0.50.1-py3.9-macosx-10.13.0-x86_64.egg/numba/core/compiler.py", line 381, in _compile_core raise e File "/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/numba-0.50.1-py3.9-macosx-10.13.0-x86_64.egg/numba/core/compiler.py", line 372, in _compile_core pm.run(self.state) File "/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/numba-0.50.1-py3.9-macosx-10.13.0-x86_64.egg/numba/core/compiler_machinery.py", line 341, in run raise patched_exception File "/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/numba-0.50.1-py3.9-macosx-10.13.0-x86_64.egg/numba/core/compiler_machinery.py", line 332, in run self._runPass(idx, pass_inst, state) File "/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/numba-0.50.1-py3.9-macosx-10.13.0-x86_64.egg/numba/core/compiler_lock.py", line 32, in _acquire_compile_lock return func(*args, **kwargs) File "/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/numba-0.50.1-py3.9-macosx-10.13.0-x86_64.egg/numba/core/compiler_machinery.py", line 291, in _runPass mutated |= check(pss.run_pass, internal_state) File "/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/numba-0.50.1-py3.9-macosx-10.13.0-x86_64.egg/numba/core/compiler_machinery.py", line 264, in check mangled = func(compiler_state) File "/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/numba-0.50.1-py3.9-macosx-10.13.0-x86_64.egg/numba/core/typed_passes.py", line 92, in run_pass typemap, return_type, calltypes = type_inference_stage( File "/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/numba-0.50.1-py3.9-macosx-10.13.0-x86_64.egg/numba/core/typed_passes.py", line 70, in type_inference_stage infer.propagate(raise_errors=raise_errors) File "/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/numba-0.50.1-py3.9-macosx-10.13.0-x86_64.egg/numba/core/typeinfer.py", line 994, in propagate raise errors[0] numba.core.errors.TypingError: Failed in nopython mode pipeline (step: nopython mode backend) Failed in nopython mode pipeline (step: nopython frontend) No implementation of function Function(.run_quicksort at 0x16d37ba60>) found for signature:

run_quicksort(array(float64, 1d, A))

There are 2 candidate implementations:

During: resolving callee type: Function(.run_quicksort at 0x16d37ba60>) During: typing of call at /Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/numba-0.50.1-py3.9-macosx-10.13.0-x86_64.egg/numba/np/arrayobj.py (5007)

File "Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/numba-0.50.1-py3.9-macosx-10.13.0-x86_64.egg/numba/np/arrayobj.py", line 5007: def array_sort_impl(arr):

    # Note we clobber the return value
    sort_func(arr)
    ^

During: lowering "$16call_method.6 = call $14load_method.5(func=$14load_method.5, args=[], kws=(), vararg=None)" at /Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/quantecon/random/utilities.py (85)

Python version: 3.9.5 (default, Sep 10 2021, 16:18:19) [Clang 12.0.5 (clang-1205.0.22.11)] QGIS version: 3.22.3-Białowieża Białowieża, 1628765ec7

Python Path: /Applications/QGIS.app/Contents/MacOS/../Resources/python /Users/emilyroutman/Library/Application Support/QGIS/QGIS3/profiles/default/python /Users/emilyroutman/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins /Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins /Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/patsy-0.5.1-py3.9.egg /Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/rasterio-1.1.5-py3.9-macosx-10.13.0-x86_64.egg /Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/scipy-1.5.1-py3.9-macosx-10.13.0-x86_64.egg /Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/matplotlib-3.3.0-py3.9-macosx-10.13.0-x86_64.egg /Applications/QGIS.app/Contents/MacOS/lib/python3.9/lib-dynload /Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/numpy-1.20.1-py3.9-macosx-10.13.0-x86_64.egg /Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/statsmodels-0.11.1-py3.9-macosx-10.13.0-x86_64.egg /Applications/QGIS.app/Contents/MacOS/lib/python39.zip /Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/geopandas-0.8.1-py3.9.egg /Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/GDAL-3.3.2-py3.9-macosx-10.13.0-x86_64.egg /Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages /Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/pandas-1.3.3-py3.9-macosx-10.13.0-x86_64.egg /Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/Fiona-1.8.13.post1-py3.9-macosx-10.13.0-x86_64.egg /Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/Rtree-0.9.7-py3.9-macosx-10.13.0-x86_64.egg /Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/numba-0.50.1-py3.9-macosx-10.13.0-x86_64.egg /Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/pyproj-3.2.0-py3.9-macosx-10.13.0-x86_64.egg /Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/opencv_contrib_python-4.3.0.36-py3.9-macosx-10.13.0-x86_64.egg /Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/Pillow-7.2.0-py3.9-macosx-10.13.0-x86_64.egg /Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/cftime-1.2.1-py3.9-macosx-10.13.0-x86_64.egg /Applications/QGIS.app/Contents/MacOS/lib/python3.9 /Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/netCDF4-1.5.4-py3.9-macosx-10.13.0-x86_64.egg /Users/emilyroutman/Library/Application Support/QGIS/QGIS3/profiles/default/python /Users/emilyroutman/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/mmqgis/forms /Volumes/GoogleDrive/My Drive/looking for...a job/SIA .

linyf13 commented 1 year ago

I too have the same issue, is there a way to work around the current problem yet?

Much thanks

fils11 commented 1 year ago

I have the same issue ? I have a mac m1

thanks

bucalem commented 11 months ago

same on macos monterey

fmvaldezg84 commented 5 months ago

same issue here on sonoma

tcubano commented 3 weeks ago

same on ubuntu 24.04 with pysal installed

dgboss commented 1 week ago

I'm having the same issue on an M1, Sonoma 14.2, QGIS 3.28.2, Python 3.9.5, PYSAL 2.5.0.