【发布时间】:2018-07-25 13:21:10
【问题描述】:
在设置环境两天后,我正在关注这个 tensorflow tutorial,我终于可以使用 cmd 运行 premade_estimator.py
但是当我尝试在 jupyter notebook 中运行相同的代码时,我收到了这个错误:
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发生异常,使用 %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)
我尝试使用以下方法修复它但没有成功:
pip install --ignore-installed --upgrade jupyter
pip install ipykernel
python -m ipykernel install
conda install notebook ipykernel
ipython kernelspec install-self
任何想法将不胜感激!谢谢!
【问题讨论】:
标签: python python-3.x tensorflow jupyter-notebook jupyter