我需要安装scipy
。但是,在大约5-7分钟的编译时间后,我在Ubuntu 14.04.3 LTS上遇到了以下错误:
sudo pip3 install scipy
...
error: Command "x86_64-linux-gnu-g++ -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -D__STDC_FORMAT_MACROS=1 -Iscipy/sparse/sparsetools -I/usr/local/lib/python3.4/dist-packages/numpy/core/include -I/usr/include/python3.4m -c scipy/sparse/sparsetools/csc.cxx -o build/temp.linux-x86_64-3.4/scipy/sparse/sparsetools/csc.o" failed with exit status 4
In file included from /usr/local/lib/python3.4/dist-packages/numpy/core/include/numpy/ndarraytypes.h:1777:0,
from /usr/local/lib/python3.4/dist-packages/numpy/core/include/numpy/ndarrayobject.h:18,
from scipy/sparse/sparsetools/sparsetools.h:5,
from scipy/sparse/sparsetools/csc.cxx:4:
/usr/local/lib/python3.4/dist-packages/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 " \
^
x86_64-linux-gnu-g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.8/README.Bugs> for instructions.
----------------------------------------
Cleaning up...
Command /usr/bin/python3 -c "import setuptools, tokenize;__file__='/tmp/pip_build_root/scipy/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-e3q7ek8f-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_root/scipy
Storing debug log for failure in /home/ubuntu/.pip/pip.log
有人知道如何解决这个问题吗?
答案 0 :(得分:1)
似乎你的numpy是使用distro包管理器安装的(即通过运行apt-get install python3-numpy
),因为numpy包位于python库的dist-packages
目录中。为什么你也不这样安装scipy?你可以运行
sudo apt-get install python3-scipy
如果您想使用pip
,我建议您在virtualenv
个实例(或者更好,virtualenvwrapper
)中安装软件包,以避免此类冲突。否则,您应该使用系统范围的pip,而不是用户安装的(输出显示您的pip属于用户ubuntu
),因此您可以先使用apt-get
安装它,然后确保使用这个新的点来安装scipy。
答案 1 :(得分:0)
安装SELECT DISTINCT
ID_NOVEO, MKP_CustomerKey
, CASE WHEN COUNT(*) OVER(PARTITION BY ID_NOVEO) >1 THEN 1 ELSE 0 END AS MoreThanOne
FROM YourTable
使它在ubuntu 14.04