The Pydroid3 android application is the best way to test and run python scripts.
I install python packages with the install option, the pip command on terminal comes with errors for same python package.
I used the free version but if you pay for monthly or lifetime then you can have more features.
Same team come with android applications to have add more features, see these IIEC team appplicatons.