加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > Python > 正文

python – Spyder在运行任何脚本时报告无效的别名

发布时间:2020-12-20 11:09:55 所属栏目:Python 来源:网络整理
导读:我不知道为什么会这样,但它似乎已经开始我更新(一切 – 康茄达更新 – 所有).自从我上次更新以来已经有一年了.一定有些变化. 这是脚本: #!/usr/bin/env python3# -*- coding: utf-8 -*-"""Created on Sun Mar 3 11:25:22 2019@author: pitosalas"""print("h
我不知道为什么会这样,但它似乎已经开始我更新(一切 – 康茄达更新 – 所有).自从我上次更新以来已经有一年了.一定有些变化.

这是脚本:

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sun Mar  3 11:25:22 2019

@author: pitosalas
"""

print("hello")

这是在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重建您的环境.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读