出现错误
g++: scipy/sparse/sparsetools/csr.cxx
g++: scipy/sparse/sparsetools/csc.cxx
/usr/local/python370/lib/python3.7/site-packages/numpy-1.15.2-py3.7-linux-aarch64.egg/numpy/distutils/system_info.py:625: UserWarning:
Atlas (http://math-atlas.sourceforge.net/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [atlas]) or by setting
the ATLAS environment variable.
self.calc_info()
Running from scipy source directory.
/usr/local/python370/lib/python3.7/site-packages/numpy-1.15.2-py3.7-linux-aarch64.egg/numpy/distutils/system_info.py:717: UserWarning: Specified path /usr/local/include/python3.7m is invalid.
return self.get_paths(self.section, key)
/usr/local/python370/lib/python3.7/site-packages/numpy-1.15.2-py3.7-linux-aarch64.egg/numpy/distutils/system_info.py:717: UserWarning: Specified path /usr/include/python3.7m is invalid.
return self.get_paths(self.section, key)
In file included from /usr/local/python370/lib/python3.7/site-packages/numpy-1.15.2-py3.7-linux-aarch64.egg/numpy/core/include/numpy/ndarraytypes.h:1821:0,
from /usr/local/python370/lib/python3.7/site-packages/numpy-1.15.2-py3.7-linux-aarch64.egg/numpy/core/include/numpy/ndarrayobject.h:18,
from scipy/sparse/sparsetools/sparsetools.h:5,
from scipy/sparse/sparsetools/csc.cxx:4:
/usr/local/python370/lib/python3.7/site-packages/numpy-1.15.2-py3.7-linux-aarch64.egg/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15: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 " \
^
In file included from /usr/local/python370/lib/python3.7/site-packages/numpy-1.15.2-py3.7-linux-aarch64.egg/numpy/core/include/numpy/ndarraytypes.h:1821:0,
from /usr/local/python370/lib/python3.7/site-packages/numpy-1.15.2-py3.7-linux-aarch64.egg/numpy/core/include/numpy/ndarrayobject.h:18,
from scipy/sparse/sparsetools/sparsetools.h:5,
from scipy/sparse/sparsetools/csc.cxx:4:
/usr/local/python370/lib/python3.7/site-packages/numpy-1.15.2-py3.7-linux-aarch64.egg/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15: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 " \
^
In file included from /usr/local/python370/lib/python3.7/site-packages/numpy-1.15.2-py3.7-linux-aarch64.egg/numpy/core/include/numpy/ndarraytypes.h:1821:0,
from /usr/local/python370/lib/python3.7/site-packages/numpy-1.15.2-py3.7-linux-aarch64.egg/numpy/core/include/numpy/ndarrayobject.h:18,
from scipy/sparse/sparsetools/sparsetools.h:5,
from scipy/sparse/sparsetools/csr.cxx:4:
/usr/local/python370/lib/python3.7/site-packages/numpy-1.15.2-py3.7-linux-aarch64.egg/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15: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 " \
^
error: Command "g++ -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -D__STDC_FORMAT_MACROS=1 -Iscipy/sparse/sparsetools -I/usr/local/python370/lib/python3.7/site-packages/numpy-1.15.2-py3.7-linux-aarch64.egg/numpy/core/include -I/usr/local/python370/include/python3.7m -c scipy/sparse/sparsetools/csc.cxx -o build/temp.linux-aarch64-3.7/scipy/sparse/sparsetools/csc.o -MMD -MF build/temp.linux-aarch64-3.7/scipy/sparse/sparsetools/csc.o.d" failed with exit status -15
解决:是因为资源不足问题。
1、下载到本地,使用python3.7 setup.py install编译
2、加大swap区
3、一部分一部分的编译,在遇到
g++: scipy/sparse/sparsetools/csr.cxx
g++: scipy/sparse/sparsetools/csc.cxx
g++: scipy/sparse/sparsetools/bsr.cxx
bsr,csr,csc并行编译时共计6个进程(每一个启动两个进程),
(1)先kill掉四个(每个会有两个进程),编译成功一个。
(2)然后重新编译,会有4个进程,kill掉相关的两个,等待其中一个编译完成。
(3)然后再次重新编译,只有2个进程了,顺利编译完成。
4、一定要重启!一定要重启!一定要重启!否则直接运行python3.7 ,然后import scipy会报错。
5、监控内存的脚本
while true; do free -m; sleep 3; done