Why Python `Memory Error` with list `append()` lots of RAM left

后端 未结 5 864
你的背包
你的背包 2020-11-30 07:49

I am building a large data dictionary from a set of text files. As I read in the lines and process them, I append(dataline) to a list.

At some point th

5条回答
  •  -上瘾入骨i
    2020-11-30 08:04

    I had a similar problem using a 32-bit version of python in a 64-bit windows environment. I tried the 64-bit windows version of python and very quickly ran into troubles with the Scipy libraries compiled for 64-bit windows.

    The totally free solution that I implemented was

    1) Install VirtualBox
    2) Install CentOS 5.6 on the VM
    3) Get the Enthought Python Distribution (Free 64 bit Linux Version).

    Now all of my Numpy, Scipy, and Matplotlib dependant python code can use as much memory as I have Ram and available Linux swap.

提交回复
热议问题