ImportError: cannot import name ‘jitclass’ from ‘numba’ (/opt/conda/lib/python3.7/site-packages/numba/__init__.py)

You get this error with python when you try from numba import jit, jitclass

Website github.com

ImportError: cannot import name 'jitclass' from 'numba' (/opt/conda/lib/python3.7/site-packages/numba/__init__.py)

How to fix : cannot import name ‘jitclass’ from ‘numba’ (/opt/conda/lib/python3.7/site-packages/numba/init.py)

You only need to import differently jitclass :

From :

from numba import jitclass

You need to use now :

from numba.experimental import jitclass

Internal links :

https://128mots.com/index.php/category/python/

Retour en haut