'Numpy error (module 'numpy.__config__' has no attribute 'blas_opt_info') [duplicate]

I use Python 3.10.2 in the latest version of Pycharm on mac. I made a few changes to my Pycharm setting to make installed libraries available to all projects. It seems that I did a mistake somewhere because now I am facing an issue. I get the error shown below. I have this issue for the latest version of numpy (numpy 1.22.2). But if I switch to numpy 1.21.3 I do not face this problem anymore. I prefer to use the latest version of numpy. So, I would be very grateful if you could help me.

So far to solve the problem: I uninstalled Numpy, and reinstalled it again. I did the same for Pycharm and Python. I checked to not have any files named numpy.py. I do not know what else can I do to fix this problem.

Traceback (most recent call last):
  
File "/Users/S/PycharmProjects/M-to-O/main.py", line 4, in <module>
    from qutip import *
  
File "/Users/S/M-to-O/lib/python3.9/site-packages/qutip/__init__.py", line 73, in <module>
    (_blas_info() == "OPENBLAS" and platform.system() == 'Darwin')
  
File "/Users/S/M-to-O/lib/python3.9/site-packages/qutip/utilities.py", line 430, in _blas_info
    blas_info = config.blas_opt_info

AttributeError: module 'numpy.__config__' has no attribute 'blas_opt_info'


Solution 1:[1]

This is a duplicate of module 'numpy.distutils.__config__' has no attribute 'blas_opt_info'.

blas_opt_info is located in numpy.distutils.system_info.blas_opt_info.

See also: https://github.com/numpy/numpy/issues/21079

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Jongwook Choi