成功解决from numba.np.ufunc import _internal SystemError: initialization of _internal failed without raising an exception
Table of contents
T1, pip or conda download and install directly
2. It is recommended to reinstall numba
3. If the error is still reported
T2, directly create a new conda environment to install all dependencies
Solve the problem
from numba.np.ufunc import _internal SystemError: initialization of _internal failed without raising an exception
Solutions
SystemError from numba.np.ufunc import _internal: _internal initialization failed without throwing an exception
Solution
T1, pip or conda download and install directly
1. Install g++
The g++ compiler is not installed, pytensor needs to use g++ to compile the C extension. It is recommended to install g++
to check the compilation toolchain: make sure that the compilation toolchain has been configured correctly before using numba
. For Windows users, you can install m2w64-toolchain.
conda install m2w64-toolchain
2. It is recommended to reinstall numba
PyMC depends on numba, but the import of numba fails
pip install numba --upgrade
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple numba --upgrade
or
conda install numba
conda update numba
3. If the error is still reported
You can try to delete PyMC and Numba in the site-packages directory and completely reinstall:
pip uninstall pymc numba -y
T2, directly create a new conda environment to install all dependencies
to try to create a new conda environment, and then install all dependencies in that environment
conda create -n py39_pymc_env python=3.9
conda activate py39_pymc_env
conda install m2w64-toolchain # or g++
pip install numba
pip install pymc