我在安装熊猫时遇到了一些问题。
creating build/temp.linux-aarch64-3.5
creating build/temp.linux-aarch64-3.5/pandas
creating build/temp.linux-aarch64-3.5/pandas/_libs
aarch64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Ipandas/_libs -I./pandas/_libs -Ipandas/_libs/src/klib -Ipandas/_libs/src -I/home/amessios/.virtualenvs/legal_subs/lib/python3.5/site-packages/numpy/core/include -I/usr/include/python3.5m -I/home/amessios/.virtualenvs/legal_subs/include/python3.5m -c pandas/_libs/window.cpp -o build/temp.linux-aarch64-3.5/pandas/_libs/window.o -Wno-unused-function
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
pandas/_libs/window.cpp: In function ‘PyObject* __pyx_pf_6pandas_5_libs_6window_24roll_generic(PyObject*, PyObject*, __pyx_t_5numpy_int64_t, __pyx_t_5numpy_int64_t, PyObject*, PyObject*, int, PyObject*, int, PyObject*, PyObject*)’:
pandas/_libs/window.cpp:43540:61: error: ‘PyArrayObject {aka struct tagPyArrayObject}’ has no member named ‘data’
__pyx_v_buf = ((__pyx_t_5numpy_float64_t *)__pyx_v_arr->data);
^
pandas/_libs/window.cpp:43599:67: error: ‘PyArrayObject {aka struct tagPyArrayObject}’ has no member named ‘data’
__pyx_v_oldbuf = ((__pyx_t_5numpy_float64_t *)__pyx_v_bufarr->data);
^
pandas/_libs/window.cpp:43627:23: error: ‘PyArrayObject {aka struct tagPyArrayObject}’ has no member named ‘data’
__pyx_v_bufarr->data = ((char *)__pyx_v_buf);
^
pandas/_libs/window.cpp:43709:21: error: ‘PyArrayObject {aka struct tagPyArrayObject}’ has no member named ‘data’
__pyx_v_bufarr->data = ((char *)__pyx_v_oldbuf);
^
pandas/_libs/window.cpp: In function ‘PyObject* __pyx_pf_6pandas_5_libs_6window_30ewmcov(PyObject*, __Pyx_memviewslice, __Pyx_memviewslice, __pyx_t_5numpy_float64_t, int, int, int, int)’:
pandas/_libs/window.cpp:45682:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
__pyx_t_2 = ((__pyx_t_1 != __pyx_v_N) != 0);
^
error: command 'aarch64-linux-gnu-gcc' failed with exit status 1
error
ERROR: Failed building wheel for pandas
Running setup.py clean for pandas
Running command /home/amessios/.virtualenvs/legal_subs/bin/python3.5 -u -c 'import setuptools, tokenize;__file__='"'"'/tmp/pip-install-zytfd7ni/pandas/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' clean --all
running clean
Failed to build pandas
Installing collected packages: pandas
在漫长的失败过程结束时:
creating build/temp.linux-aarch64-3.5/pandas/_libs/tslibs
creating build/temp.linux-aarch64-3.5/pandas/_libs/tslibs/src
creating build/temp.linux-aarch64-3.5/pandas/_libs/tslibs/src/datetime
aarch64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I./pandas/_libs/tslibs -I./pandas/_libs -Ipandas/_libs/src/klib -Ipandas/_libs/src -Ipandas/_libs/tslibs/src -Ipandas/_libs/tslibs -I/home/amessios/.virtualenvs/legal_subs/lib/python3.5/site-packages/numpy/core/include -I/usr/include/python3.5m -I/home/amessios/.virtualenvs/legal_subs/include/python3.5m -c pandas/_libs/index.c -o build/temp.linux-aarch64-3.5/pandas/_libs/index.o -Wno-unused-function
pandas/_libs/index.c: In function ‘__pyx_f_6pandas_5_libs_5index_get_value_at’:
pandas/_libs/index.c:4332:22: error: ‘PyArrayObject {aka struct tagPyArrayObject}’ has no member named ‘descr’
switch (__pyx_v_arr->descr->type_num) {
^
pandas/_libs/index.c: In function ‘__pyx_f_6pandas_5_libs_5index_convert_scalar’:
pandas/_libs/index.c:15370:22: error: ‘PyArrayObject {aka struct tagPyArrayObject}’ has no member named ‘descr’
switch (__pyx_v_arr->descr->type_num) {
^
error: command 'aarch64-linux-gnu-gcc' failed with exit status 1
Running setup.py install for pandas ... error
Cleaning up...
Removing source in /tmp/pip-install-makgq9t0/pandas
Removed build tracker '/tmp/pip-req-tracker-nj51wx6h'
ERROR: Command "/home/amessios/.virtualenvs/legal_subs/bin/python3.5 -u -c 'import setuptools, tokenize;__file__='"'"'/tmp/pip-install-makgq9t0/pandas/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-erqi_z5_/install-record.txt --single-version-externally-managed --compile --install-headers /home/amessios/.virtualenvs/legal_subs/include/site/python3.5/pandas" failed with error code 1 in /tmp/pip-install-makgq9t0/pandas/
Exception information:
Traceback (most recent call last):
File "/home/amessios/.virtualenvs/legal_subs/lib/python3.5/site-packages/pip/_internal/cli/base_command.py", line 178, in main
status = self.run(options, args)
File "/home/amessios/.virtualenvs/legal_subs/lib/python3.5/site-packages/pip/_internal/commands/install.py", line 414, in run
use_user_site=options.use_user_site,
File "/home/amessios/.virtualenvs/legal_subs/lib/python3.5/site-packages/pip/_internal/req/__init__.py", line 58, in install_given_reqs
**kwargs
File "/home/amessios/.virtualenvs/legal_subs/lib/python3.5/site-packages/pip/_internal/req/req_install.py", line 951, in install
spinner=spinner,
File "/home/amessios/.virtualenvs/legal_subs/lib/python3.5/site-packages/pip/_internal/utils/misc.py", line 776, in call_subprocess
% (command_desc, proc.returncode, cwd))
pip._internal.exceptions.InstallationError: Command "/home/amessios/.virtualenvs/legal_subs/bin/python3.5 -u -c 'import setuptools, tokenize;__file__='"'"'/tmp/pip-install-makgq9t0/pandas/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-erqi_z5_/install-record.txt --single-version-externally-managed --compile --install-headers /home/amessios/.virtualenvs/legal_subs/include/site/python3.5/pandas" failed with error code 1 in /tmp/pip-install-makgq9t0/pandas/
我有 Ubuntu 16.04、python 3.5.2 和我认为需要的所有依赖项。我还使用以下方法在虚拟环境中进行安装:
pip install -v pandas
有人知道吗?