import radiomics报错ImportError: numpy.core.multiarray failed to import

ImportError: numpy.core.multiarray failed to import

Reason

The numpy version is incorrect, causing the issue; it needs to be downgraded.

Solution

Find a suitable version of numpy and manually test to ensure it works.

numpy==1.23
pandas== 2.2.3
pyradiomics== 3.1.0

Also, pay attention to the Python version python==3.9.21.

Just follow this configuration.

Otherwise, you will get errors due to the Python version pip安装pyradiomics时报错 error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.38.33130\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2