Opened 8 months ago
Closed 7 months ago
#823 closed defect (fixed)
python3-numba: AttributeError: module 'numpy' has no attribute 'long'
Reported by: | jakimowb | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | Package |
Version: | Keywords: | numba python numpy | |
Cc: | jakimowb |
Description
By now, the latest versions of numba and numpy available in the OSGeo4W installer are: numba 0.51.2-2 (python3-numba) and numpy 1.24.1-1 (python3-nunmpy
numba 0.51 uses np.long (e.g. in numba/core(types/__init__.py
), but this was removed from numpy with version 1.24. This leads to the following python import error:
python Python 3.9.18 (heads/master:5eba59e, Feb 1 2024, 20:02:10) [MSC v.1929 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import numba F:\OSGeo4W\apps\Python39\lib\site-packages\numba\core\types\__init__.py:108: FutureWarning: In the future `np.long` will be defined as the corresponding NumPy scalar. (This may have returned Python scalars in past versions. long_ = _make_signed(np.long) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "F:\OSGeo4W\apps\Python39\lib\site-packages\numba\__init__.py", line 18, in <module> from numba.core import types, errors File "F:\OSGeo4W\apps\Python39\lib\site-packages\numba\core\types\__init__.py", line 108, in <module> long_ = _make_signed(np.long) File "F:\OSGeo4W\apps\Python39\lib\site-packages\numpy\__init__.py", line 284, in __getattr__ raise AttributeError("module {!r} has no attribute " AttributeError: module 'numpy' has no attribute 'long'
I recommend to update numba to a more recent version, e.g. 0.53.1 https://github.com/numba/numba/releases
Note:
See TracTickets
for help on using tickets.
Fixed in https://github.com/jef-n/OSGeo4W/cf3e48835a676262507d9d30385792702354756d