Here is the standard way to use Python 3 and pip in MSYS2:

Select the "MSYS2 MinGW 64-bit" shortcut or run mingw64.exe to start a MinGW 64-bit shell.  (32-bit should work too.)
Run pacman -S $MINGW_PACKAGE_PREFIX-{python3,python3-pip} to install both Python 3 and pip.
Run pip install PKGNAME to install a package you need.
Run python path/to/script.py to run your script.

I tested these instructions just now.  I was able to run pip install pyserial and then I was able to run a script that started with import serial.
OS: windows 10
I install python3.9, pip install many 3rd party packages and use them well on both Pycharm and CMD terminal;
Later, I install MSYS2 and then I tpye 'python' on the terminal of MSYS2 and get into python terminal; it seems well until now. When I import sth, getting the warning "No module named 'xxx'" which can be imported well on Pycharm or CMD terminal.
so I guess the path of 3rd party packages not be included for MSYS2, how to resovle it?
3rd party libraries of Python cant be used on MSYS2 terminal, how to use them in MSYS2 terminal?