Spyder Python动画不起作用 [英] Spyder Python Animation not working

查看:344
本文介绍了Spyder Python动画不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用anaconda的spyder开发一个python项目,并且试图使动画功能正常工作。

I'm working on a python project using spyder from anaconda and I am trying to get the animation function working.

我在这里找到了一个基本的动画示例:< a href = http://matplotlib.org/1.4.1/examples/animation/basic_example.html rel = nofollow noreferrer> http://matplotlib.org/1.4.1/examples/animation/basic_example.html
并尝试使其正常工作。

I found a basic animation example here: http://matplotlib.org/1.4.1/examples/animation/basic_example.html and tried to make it work.

但是当我运行它时,Python和iPython控制台都没有任何反应。

However when I run it, nothing happens both in the Python and iPython console.

我找到了这个答案:动画来自matplotlib在spyder中不起作用但是,更改首选项不会执行任何操作,并且键入%matplotlib qt会返回:没有名为qt4的模块。

I found this answer: Animation from matplotlib not working in spyder However, changing the preferences does not do anything and typing in %matplotlib qt returns: No module named qt4.

Spyder版本:3.1 .0
在MacOS Sierra上运行

Spyder Version: 3.1.0 Running on MacOS Sierra

推荐答案

感谢大家的回答。我发现了错误,是因为我忘记在文件名中添加.py,因此Spyder无法将它们识别为python文件。

Thanks everyone for the answers. I found out my error, it was that I forgot to add .py to the file name so Spyder did not recognise them as python files.

这篇关于Spyder Python动画不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆