ipython: Duplicated definition of built-in magic aliases after %reset
When running %reset -f
in Jupyter notebook or Spyder, the following message will be printed.
ERROR:root:Invalid alias: The name clear can't be aliased because it is another magic command.
ERROR:root:Invalid alias: The name more can't be aliased because it is another magic command.
ERROR:root:Invalid alias: The name less can't be aliased because it is another magic command.
ERROR:root:Invalid alias: The name man can't be aliased because it is another magic command.
However, running %reset -f
in IPython itself is just fine.
I started experiencing this after upgrading to IPython 7.3.0, and I believe that this behavior was from the change #11528. Maybe those aliases should only be redefined when running in the IPython shell, not in Jupyter or Spyder as a kernel.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 11
- Comments: 19 (7 by maintainers)
Try this: %reset -s -f
In Spyder, using ipython 7.5, every execution still shows this at the beginning: ERROR:root:Invalid alias: The name clear can’t be aliased because it is another magic command. ERROR:root:Invalid alias: The name more can’t be aliased because it is another magic command. ERROR:root:Invalid alias: The name less can’t be aliased because it is another magic command. ERROR:root:Invalid alias: The name man can’t be aliased because it is another magic command.
My new conda update procedure: conda update --all conda install ipython=7.2.0
I’d like to stay up-to-date in ipython. However, continued use of version 7.2.0 seems like the “lesser of evils”.
7.5 the issue remains
@irvanseptiar Please read the entire thread and you will see that the issue was resolved in version 7.7. Update your repo.
Still an issue in ipython 7.6
Successful work-around in Anaconda environment:
conda install ipython=7.2.0