I did the getting started on Python Invoke
from invoke import task
@task
def build():
print("Building!")
The expected output is
$ invoke build
Building!
However, my output is
$ invoke build
Can't find any collection named 'tasks'!
I have no idea why.
Something amazing is, once I invoke in the virtualenv, then I can build without virtualenv.
> mkvirtualenv myenv
> invoke build
Building!
> deactivate myenv
> invoke build
Building!
Did I miss something?
According to documentation your file containing task should be named tasks.py. Make sure you are running build from the same directory as tasks.py, too
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With