仅在Spyder IDE中出现内存错误 [英] Memory error only in Spyder IDE

查看:721
本文介绍了仅在Spyder IDE中出现内存错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

执行以下操作会在我的Spyder Python IDE中导致MemoryError:

doing the following causes a MemoryError in my Spyder Python IDE:

>>> from numpy  import *
>>> a_flt = ones((7000,7000), dtype=float64)+4
>>> b_flt = ones((7000,7000), dtype=float64)+1
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>    
MemoryError
>>> 

这很奇怪,因为Spyder的状态栏中的内存使用情况显示只有大约10%.我的记忆中有25%被使用了.此外,当在标准Python IDE GUI中生成更多数量的此类大型7000 * 7000阵列时,一切正常.

THis is weird, since the memory usage in the statusbar of Spyder shows that only approx. 25% of my memory is used. Furthermore, when generating even a higher number of these large 7000*7000 arrays in the standard Python IDE GUI, everything works fine.

>>> from numpy  import *
>>> a_flt = ones((7000,7000), dtype=float64)+4
>>> b_flt = ones((7000,7000), dtype=float64)+1
>>> c_flt = ones((7000,7000), dtype=float64)+1
>>> d_flt = ones((7000,7000), dtype=float64)+1
>>> e_flt = ones((7000,7000), dtype=float64)+1 

即使创建了5个浮点数组,内存需求也仅约占我16GB总内存的三分之一.因此,这不是真正的内存问题.我在spyder Google小组 https中找到了与此问题类似的问题: //groups.google.com/forum/#!msg/spyderlib/qE9tiriT91s/0x3s2Aw-efMJ ,但是未提供任何答案.如果有人可以帮助我解决这种矛盾的情况,那将是非常不错的. 预先感谢,
帕特里克

Even with 5 floating point arrays created, memory requirements only amount to about a third of my total memory of 16GB. So this cannot be a real memory problem, then. I found a similiar question on this issue in a spyder google group https://groups.google.com/forum/#!msg/spyderlib/qE9tiriT91s/0x3s2Aw-efMJ, however no answer was provided. It would really be nice if someone could help me with this paradoxical situation. Thanks in advance,
Patrick

推荐答案

安装64位版本的 Python 和Spyder.这消除了我这个错误.

Install 64bit version of Python and Spyder. This eliminated me this error.

这篇关于仅在Spyder IDE中出现内存错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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