can you check by typing “which python” in the terminal? That’ll tell what python executable it’s using. Also, if you’re submitting a job via a job scheduler it might be changing the environment post-launch. For example with PBS you need to state the environment at the beginning of your .py script.