我刚刚在我的 centos 6.3 服务器上安装(并重新安装)python 2.7.3,并将 cpanel 内置到我系统上的 /opt/python2.7.3 目录中。我还使用 --enable-shared 标志安装了它,然后为它配置了 setuptools。我现在遇到问题了,尽管当我尝试easy_install 或使用基本的python thigns,例如bin/pcreate(我正在构建一个Web 应用程序)时,它会抛出MemoryError()
我确信有可用内存,因为 free -m 表明系统上有超过 2gb 的可用内存。这是 MemoryError 回溯之一的示例:
Traceback (most recent call last):
File "bin/pcreate", line 8, in <module>
load_entry_point('pyramid==1.4a3', 'console_scripts', 'pcreate')()
File "/home/urcellar/betaurcellar/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 318, in load_entry_point
File "/home/urcellar/betaurcellar/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 2221, in load_entry_point
File "/home/urcellar/betaurcellar/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 1954, in load
File "/home/urcellar/betaurcellar/lib/python2.7/site-packages/pyramid-1.4a3-py2.7.egg/pyramid/scripts/pcreate.py", line 5, in <module>
import optparse
File "/opt/python2.7/lib/python2.7/optparse.py", line 90, in <module>
from gettext import gettext
MemoryError
我不确定是什么坏了或该怎么办...我做了一个全新安装,所以它绝对不是python下载或安装,必须是系统上的其他东西......
谢谢
编辑:ulimit-a
core file size (blocks, -c) 1000000
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 127196
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files (-n) 4096
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 14335
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited