'python invoke is using a different interpreter than terminal

I have installed invoke to my project via poetry.

Now when I run something with the ctx object in the tasks, it is using a different interpreter than when I am running the same command in terminal.

How to change the interpreter used by invoke?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source