Solution:
Configure environment variables for virtual environment
The path is the path of the Python interpreter in the virtual environment
in Python, file => settings=> project interpreter=> add=> System
interpreter, select the python path of the above virtual environment, click OK, and no more errors will be reported