在matplotlib升级后,Spyder不运行Python脚本 [英] Spyder does not run Python scripts after matplotlib upgrade

查看:281
本文介绍了在matplotlib升级后,Spyder不运行Python脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用 Spyder 2.1.9 在Python 2.7中编码,使用 matplotlib 1.1 。操作系统是Linux Ubuntu 12.04 LTS。

I was coding in Python 2.7 with Spyder 2.1.9, using matplotlib 1.1. The operating system is Linux Ubuntu 12.04 LTS.

我要求使用 sudo pip升级matplotlib --upgrade python-matplotlib 。升级顺利:结束消息已成功安装matplotlib numpy foos bars

I requested the upgrade of matplotlib with sudo pip --upgrade python-matplotlib. The upgrade went well: the end message is successfully installed matplotlib numpy foos bars.

现在,如果我打开一个终端中的解释器并键入

Now, if I open an interpreter in the terminal and type

  import matplotlib
  print(matplotlib.__version__)

答案是 1.5.1 。这个版本的matplotlib安装在 /usr/local/lib/python2.7/dist-packages/matplotlib / __ init __。pyc 中,如果这条信息有用的话。

the answer is 1.5.1. This version of matplotlib is installed in /usr/local/lib/python2.7/dist-packages/matplotlib/__init__.pyc, if this piece of information can be useful.

然而,当我回到Spyder IDE并尝试运行任何居住在那里的脚本(关键F5)时,再也没有任何事情发生了。没有解释器窗口在Spyder中激活。同上,如果我创建一个全新的'hallo world'脚本。

However, when I come back to the Spyder IDE and I try to run any of the scripts that were dwelling there (key F5), nothing happens any longer. No interpreter window gets active within Spyder. Ditto if I create a brand new 'hallo world' script.

Spyder中的内部控制台确实有效,它只是脚本而不是执行,无论新旧。这是Spyder内部控制台在新设置中的快照:

The internal console in Spyder does work, it's just the scripts that are not executed, whether new or old. This is a snapshot of Spyder internal console in the new setting:

可能的原因是什么?
如何让Spyder像往常一样再次工作?

What is the possible cause of this? How do I get Spyder working again as usual?

推荐答案

有很多错误。我猜你应该降级matplotlib。

There were many bugs when using matplotlib 1.5 on Spyder versions up to 2.3.7. I guess you should downgrade matplotlib.

这篇关于在matplotlib升级后,Spyder不运行Python脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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