【发布时间】:2021-10-22 11:59:59
【问题描述】:
我试图提示用户从有限的选项列表中选择一个选项。
我尝试使用inquirer.List()。
inquirer module 似乎在我的 Windows shell 上运行良好,但不适用于 Jupyter Notebook。在运行单元时使用
questions = [inquirer.List('regression_model', message = 'Select the best Regression Model as per Model Perfomance',
choices = ['Multiple Linear Regression', 'Polynomial Regression', 'Ridge Regression'])]
answers = inquirer.prompt(questions)
内核一直很忙,它不会提示选项。
我认为导入inquirer 有问题,所以我在 Jupyter Notebook 中也做了!pip install inquirer,它说要求已经满足,所以它似乎不是导入问题。
inquirer 不能与 Jupyter Notebook 一起使用吗?如果不是,我可以使用哪些替代方法从有限的选项列表中提示一个选项?
【问题讨论】:
标签: python machine-learning jupyter-notebook kernel command-line-interface