python - Spyder reports invalid alias when running any script
问题描述
I can't tell why this is happening but it seems to have started when I updated (everything - conda update --all). It had been about 1 year since I last had updated. Something must have changed.
Here is the script:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sun Mar 3 11:25:22 2019
@author: pitosalas
"""
print("hello")
And here is the output from pressing the green triangle in spyder:
Python 3.6.6 |Anaconda, Inc.| (default, Jun 28 2018, 11:07:29)
Type "copyright", "credits" or "license" for more information.
IPython 7.3.0 -- An enhanced Interactive Python.
runfile('/Users/pitosalas/Box Sync/datawork/2019Resubmit/deleteme.py', wdir='/Users/pitosalas/Box Sync/datawork/2019Resubmit')
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.
hello
解决方案
我今天遇到了同样的情况,我检查如下。
conda create -n testenv python spyder ipython=7.3
问题发生。
conda create -n testenv python spyder ipython=7.2.0
在这种环境下,它不会发生。
我建议您使用 ipython7.2.0 重建您的环境或降级:
conda install ipython=7.2.0
推荐阅读
- glsl - 使用 pixi-js 在 GLSL 中进行纹理缩放
- javascript - GoJS 调整图表每个元素的大小
- html - 两个相同的html元素有不同的尺寸
- python - 查找 Xpath 对每个登录都是唯一的元素
- python - 如何在pdf中提取输入字段的x0,y0坐标
- flutter - 在 DataTable 中显示所选单元格的详细数据
- java - 带有@Param null 参数的 JPA 仍然抛出错误
- javascript - 如何重新启动已设置间隔的倒数计时器?Javascript
- azure - 如何将 Ubuntu VM 从 Digital Ocean 迁移到 Azure
- reactjs - 材质 UI 工具提示未在嵌套组件上呈现