我遇到一个错误(已安装Python 3.8.2):
import click
@click.command
@click.option("--count", default=1, help="Number of greetings.")
@click.option("--name", prompt="Your name", help="The person to greet.")
def hello(count, name):
for _ in range(count):
click.echo("Hello, {name}!")
if __name__ == '__main__':
hello()
返回:
Traceback (most recent call last):
File "c:/py/myKonsole/kclick.py", line 12, in <module>
hello()
TypeError: decorator() missing 1 required positional argument: 'f'
我尝试安装pyhton 3.4.4,但不起作用