'sudo' sets up a new environment because it aims to be safe and because the new user won't have the same view of the world as you have.
You can use the keep-environment parameter to 'sudo' to preserve some of them, but that won't guarantee that your view is the same. It could be a permissions problem, or a relative path problem or a difference in homes, or a user shell-initialization setting in the other user. You can likely fabricate a good environment on the other side of sudo with something like "sudo env PYTHONSOMETHING=$PYTHONSOMETHING programname" .
So, it's complicated. I'd first use "sudo -i" to get an interactive shell and test what it looks like, and find what to change.