这个错误只发生在Jupyter网络编辑器内。input函数的使用不在是简单的input,需要在input之前加await。
是一个已知问题:
https://discourse.jupyter.org/t/codes-on-https-jupyter-org-try-jupyter-lab-not-working-properly-anymore/13374
https://github.com/jupyterlite/jupyterlite/issues/275
起因是,Jupyter切换了try相关的软件包,这个JupterLite有自己的优势,但是也有些问题:
We recently switched some of the try repos to use JupyterLite to reduce the load on mybinder: Https://jupyter.org/try so slow… Why? - #15 by krassowski 22
JupyterLite has the big advantage that it runs entirely in the browser so won’t run into problems if there are too many users. There are some differences from normal Python though, and using input is a known issue- currently using await is the workaround:
其实这种网络编辑开发,不让实际在本地安装一个python的环境!