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

问题描述 投票:6回答:3

我不知道为什么会这样,但它似乎已经开始我更新(一切 - 康茄达更新 - 所有)。自从我上次更新以来已经有一年了。一定有些变化。

这是脚本:

#!/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
python spyder
3个回答
5
投票

我今天遇到了同样的情况,我检查了如下。 conda create -n testenv python spyder ipython=7.3 问题发生了。

conda create -n testenv python spyder ipython=7.2.0 在这种环境中,它不会发生。

我建议您使用ipython7.2重建您的环境。


2
投票

根本原因可以追溯到this commit到ipython。降级到ipython = 7.2.0肯定有帮助。希望这很快就能解决。


1
投票

conda install ipython = 7.2.0为我工作。 ipython 7.3.0是罪魁祸首。

© www.soinside.com 2019 - 2024. All rights reserved.