Numba needs NumPy 1.21 or less
时间: 2024-03-10 15:48:11 浏览: 36
This error message usually occurs when you are using a version of Numba that is not compatible with the version of NumPy installed on your system. Specifically, the version of Numba you are using requires NumPy 1.21 or earlier, but you likely have a newer version of NumPy installed.
To resolve this issue, you can try downgrading NumPy to version 1.21 or earlier. You can do this using pip by running the following command:
```
pip install numpy==1.21
```
If you have a newer version of NumPy installed, this command will uninstall it and install version 1.21 instead. Once NumPy 1.21 is installed, you should be able to use Numba without encountering the compatibility issue.
Alternatively, you could try upgrading your version of Numba to a version that is compatible with your current version of NumPy. You can do this using pip by running the following command:
```
pip install --upgrade numba
```
This will upgrade Numba to the latest version, which should be compatible with the latest version of NumPy.