Pmysql import error, what's going on?

I have a test.py file that imports the pymysql module. Enter python test.py on the terminal to run successfully, but if you enter python3 test.py, you will report an error ImportError: No module named "pymysql"

.

I think this is due to the inconsistency between the versions of pymysql and python, so I installed pymysql, as sudo pip3 install pymysql but reported an error

what"s going on? Or how can I use python3 test.py without making mistakes?

Mar.06,2021

because your pymysql is not installed,

Menu