相关疑难解决方法(0)

如何修复ipykernel_launcher.py:错误:jupyter中无法识别的参数?

我在设置了最终可以使用cmd 运行的环境两天后遵循这个tensorflow 教程premade_estimator.py

但是当我尝试在jupyter笔记本中运行相同的代码时,我收到此错误:

usage: ipykernel_launcher.py [-h] [--batch_size BATCH_SIZE]
                             [--train_steps TRAIN_STEPS]

ipykernel_launcher.py: error: unrecognized arguments: -f C:\Users\david\AppData\Roaming\jupyter\runtime\kernel-4faecb24-6e87-40b4-bf15-5d24520d7130.json
Run Code Online (Sandbox Code Playgroud)

发生异常,使用%tb查看完整的回溯.

SystemExit: 2

C:\Anaconda3\envs\python3x\lib\site-packages\IPython\core\interactiveshell.py:2918: 
UserWarning: To exit: use 'exit', 'quit', or Ctrl-D. warn("To exit: use 'exit', 'quit', or Ctrl-D.", stacklevel=1)
Run Code Online (Sandbox Code Playgroud)

我尝试使用以下方法修复它但没有成功:

pip install --ignore-installed --upgrade jupyter

pip install ipykernel
python -m ipykernel install

conda install notebook ipykernel
ipython kernelspec install-self
Run Code Online (Sandbox Code Playgroud)

任何想法都会欣赏!谢谢!

python python-3.x jupyter tensorflow jupyter-notebook

8
推荐指数
3
解决办法
2万
查看次数