AWS pandas 安装出现错误:虚拟内存已耗尽:无法分配内存

AWS pandas installation giving ERROR: virtual memory exhausted: Cannot allocate memory

本文关键字:内存 分配 虚拟内存 安装 pandas 错误 AWS      更新时间:2023-10-16

我正在尝试在 AWS EC2 实例上安装 pandas,t2.micro RAM 大小为 1GB,但它在中间抛出了一个错误

> from pandas/_libs/join.c:435:
>     /usr/lib64/python2.7/dist-packages/numpy/core/include/numpy/npy_deprecated_api.h:11:2:
> warning: #warning "Using deprecated NumPy API, disable it by #defining
> NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
>      #warning "Using deprecated NumPy API, disable it by #defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION"
>       ^
>     virtual memory exhausted: Cannot allocate memory
>     error: command 'gcc' failed with exit status 1
>     
>     ----------------------------------------
>     Command "/usr/bin/python2.7 -c "import setuptools, tokenize;__file__='/tmp/pip-build-XJKxj6/pandas/setup.py';exec(compile(getattr(tokenize,
> 'open', open)(__file__).read().replace('rn', 'n'), __file__,
> 'exec'))" install --record /tmp/pip-QLWuWh-record/install-record.txt
> --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-XJKxj6/pandas

可能是什么问题?是t2.micro的问题吗?

熊猫安装需要多少内存?

问题出在实例大小微上。我将实例大小增加到很小,然后它对我有用。