Are you using the shell module to send the command line? Perhaps try using the full path to the python interpreter you want to use.
Often '/usr/bin/python' is a link to /usr/bin/python2 or /usr/bin/python3
There may be a more elegant way as well, just a thought though. I'm a bit curious also, I haven't had time, but I have had a couple use case ideas using some python scripts in Ansible.
I did find this post, where it's mentioned to 'cd' first, but personally - I'd just use the full path to python.
/usr/bin/python -m packagename.modulename (If it complains there's no 'python' use /usr/bin/python2 or /usr/bin/python3 or create a symlink from /usr/bin/python to your chosen version)