在使用Jupyter notebook时发现错误:
ipykernel_launcher.py: error: unrecognized arguments: -f /root/.local/share/jupyter/runtime/kernel-c6345bc7-a68a-49c3-a14e-d696cfac4c23.json
An exception has occurred, use %tb to see the full traceback.
发现错误出在:
opt = parser.parse_args()
由于在jupyter notebook中,args不为空。解决方法为:
opt = parser.parse_args(args=[])
在opt = parser.parse_args(args=[])传入参数args=[]
即可。
如果本文对你有帮助,欢迎点赞、订阅以及star我的项目。
你的支持是我创作的最大动力!