如何卸载AI平台JupyterLab notebook中的包?

How to uninstall a package in AI platform JupyterLab notebook?

我想卸载AI平台笔记本的包

!pip3 uninstall statsmodels

但是,我收到了这个回复,无法回复y/n

found existing installation: statsmodels 0.11.1
Uninstalling statsmodels-0.11.1:
  Would remove:
    /home/jupyter/.local/lib/python3.5/site-packages/statsmodels-0.11.1.dist-info/*
    /home/jupyter/.local/lib/python3.5/site-packages/statsmodels/*
Proceed (y/n)? 

我可以尝试从终端执行此操作,但我注意到我在终端中执行的操作与在笔记本中执行的操作不同。就像我 运行 pip freeze 一样,我从笔记本和终端安装了一组不同的包

和命令行一样,可以提前传入答案:

!echo y | pip3 uninstall statsmodels