I am facing error while installing pandas==0.23 on my Raspberry Pi 4B device with Bookworm desktop version installed. What to do?
creating build/temp.linux-aarch64-3.6/pandas/io/sas
gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Ipandas/_libs/src/klib -Ipandas/_libs/src -I/usr/local/lib/python3.6/site-packages/numpy/core/include -I/usr/local/include/python3.6m -c pandas/io/sas/sas.c -o build/temp.linux-aarch64-3.6/pandas/io/sas/sas.o -Wno-unused-function
In file included from /usr/local/lib/python3.6/site-packages/numpy/core/include/numpy/ndarraytypes.h:1822,
from /usr/local/lib/python3.6/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
from /usr/local/lib/python3.6/site-packages/numpy/core/include/numpy/arrayobject.h:4,
from pandas/io/sas/sas.c:610:
/usr/local/lib/python3.6/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
17 | #warning "Using deprecated NumPy API, disable it with " \
| ^~~~~~~
pandas/io/sas/sas.c: In function ‘__pyx_f_6pandas_2io_3sas_4_sas_rle_decompress’:
pandas/io/sas/sas.c:3745:29: warning: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘int’ [-Wsign-compare]
3745 | __pyx_t_10 = ((__pyx_t_38 != __pyx_v_result_length) != 0);
| ^~
pandas/io/sas/sas.c: In function ‘__pyx_f_6pandas_2io_3sas_4_sas_rdc_decompress’:
pandas/io/sas/sas.c:4587:28: warning: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘int’ [-Wsign-compare]
4587 | __pyx_t_8 = ((__pyx_t_32 != __pyx_v_result_length) != 0);
| ^~
pandas/io/sas/sas.c:4115:65: warning: ‘__pyx_v_ctrl_bits’ may be used uninitialized [-Wmaybe-uninitialized]
4115 | __pyx_t_8 = (((__pyx_v_ctrl_bits & __pyx_v_ctrl_mask) == 0) != 0);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
pandas/io/sas/sas.c:3885:27: note: ‘__pyx_v_ctrl_bits’ was declared here
3885 | __pyx_t_5numpy_uint16_t __pyx_v_ctrl_bits;
| ^~~~~~~~~~~~~~~~~
gcc -shared build/temp.linux-aarch64-3.6/pandas/io/sas/sas.o -o build/lib.linux-aarch64-3.6/pandas/io/sas/_sas.cpython-36m-aarch64-linux-gnu.so
cythoning pandas/io/msgpack/_packer.pyx to pandas/io/msgpack/_packer.cpp
/usr/local/lib/python3.6/site-packages/Cython/Compiler/Main.py:367: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /home/pi/pandas/pandas/io/msgpack/_packer.pyx
tree = Parsing.p_module(s, pxd, full_module_name)
building 'pandas.io.msgpack._packer' extension
creating build/temp.linux-aarch64-3.6/pandas/io/msgpack
gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -D__LITTLE_ENDIAN__=1 -Ipandas/_libs/src/msgpack -Ipandas/_libs/src/klib -Ipandas/_libs/src -I/usr/local/lib/python3.6/site-packages/numpy/core/include -I/usr/local/include/python3.6m -c pandas/io/msgpack/_packer.cpp -o build/temp.linux-aarch64-3.6/pandas/io/msgpack/_packer.o -Wno-unused-function
g++ -shared build/temp.linux-aarch64-3.6/pandas/io/msgpack/_packer.o -o build/lib.linux-aarch64-3.6/pandas/io/msgpack/_packer.cpython-36m-aarch64-linux-gnu.so
cythoning pandas/io/msgpack/_unpacker.pyx to pandas/io/msgpack/_unpacker.cpp
/usr/local/lib/python3.6/site-packages/Cython/Compiler/Main.py:367: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /home/pi/pandas/pandas/io/msgpack/_unpacker.pyx
tree = Parsing.p_module(s, pxd, full_module_name)
building 'pandas.io.msgpack._unpacker' extension
gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -D__LITTLE_ENDIAN__=1 -Ipandas/_libs/src/msgpack -Ipandas/_libs/src/klib -Ipandas/_libs/src -I/usr/local/lib/python3.6/site-packages/numpy/core/include -I/usr/local/include/python3.6m -c pandas/io/msgpack/_unpacker.cpp -o build/temp.linux-aarch64-3.6/pandas/io/msgpack/_unpacker.o -Wno-unused-function
pandas/io/msgpack/_unpacker.cpp: In function ‘PyObject* __pyx_pf_6pandas_2io_7msgpack_9_unpacker_2unpackb(PyObject*, PyObject*, PyObject*, PyObject*, int, PyObject*, PyObject*, PyObject*, PyObject*, Py_ssize_t, Py_ssize_t, Py_ssize_t, Py_ssize_t, Py_ssize_t)’:
pandas/io/msgpack/_unpacker.cpp:2624:31: warning: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘Py_ssize_t’ {aka ‘long int’} [-Wsign-compare]
2624 | __pyx_t_2 = ((__pyx_v_off < __pyx_v_buf_len) != 0);
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
pandas/io/msgpack/_unpacker.cpp: In function ‘PyObject* __pyx_f_6pandas_2io_7msgpack_9_unpacker_8Unpacker_read_from_file(__pyx_obj_6pandas_2io_7msgpack_9_unpacker_Unpacker*)’:
pandas/io/msgpack/_unpacker.cpp:4698:19: warning: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘Py_ssize_t’ {aka ‘long int’} [-Wsign-compare]
4698 | if (((__pyx_t_2 < __pyx_t_3) != 0)) {
| ~~~~~~~~~~^~~~~~~~~~~
pandas/io/msgpack/_unpacker.cpp: In function ‘PyObject* __pyx_pf_6pandas_2io_7msgpack_9_unpacker_8Unpacker_8read_bytes(__pyx_obj_6pandas_2io_7msgpack_9_unpacker_Unpacker*, Py_ssize_t)’:
pandas/io/msgpack/_unpacker.cpp:5329:19: warning: comparison of integer expressions of different signedness: ‘Py_ssize_t’ {aka ‘long int’} and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare]
5329 | if (((__pyx_t_1 < __pyx_t_2) != 0)) {
| ~~~~~~~~~~^~~~~~~~~~~
g++ -shared build/temp.linux-aarch64-3.6/pandas/io/msgpack/_unpacker.o -o build/lib.linux-aarch64-3.6/pandas/io/msgpack/_unpacker.cpython-36m-aarch64-linux-gnu.so
building 'pandas._libs.json' extension
creating build/temp.linux-aarch64-3.6/pandas/_libs/src/ujson
creating build/temp.linux-aarch64-3.6/pandas/_libs/src/ujson/python
creating build/temp.linux-aarch64-3.6/pandas/_libs/src/ujson/lib
gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Ipandas/_libs/src/ujson/python -Ipandas/_libs/src/ujson/lib -Ipandas/_libs/src/datetime -I/usr/local/lib/python3.6/site-packages/numpy/core/include -I/usr/local/include/python3.6m -c pandas/_libs/src/ujson/python/ujson.c -o build/temp.linux-aarch64-3.6/pandas/_libs/src/ujson/python/ujson.o -D_GNU_SOURCE -Wno-unused-function
gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Ipandas/_libs/src/ujson/python -Ipandas/_libs/src/ujson/lib -Ipandas/_libs/src/datetime -I/usr/local/lib/python3.6/site-packages/numpy/core/include -I/usr/local/include/python3.6m -c pandas/_libs/src/ujson/python/objToJSON.c -o build/temp.linux-aarch64-3.6/pandas/_libs/src/ujson/python/objToJSON.o -D_GNU_SOURCE -Wno-unused-function
In file included from /usr/local/lib/python3.6/site-packages/numpy/core/include/numpy/ndarraytypes.h:1822,
from /usr/local/lib/python3.6/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
from /usr/local/lib/python3.6/site-packages/numpy/core/include/numpy/arrayobject.h:4,
from pandas/_libs/src/ujson/python/objToJSON.c:44:
/usr/local/lib/python3.6/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
17 | #warning "Using deprecated NumPy API, disable it with " \
| ^~~~~~~
pandas/_libs/src/ujson/python/objToJSON.c: In function ‘initObjToJSON’:
pandas/_libs/src/ujson/python/objToJSON.c:193:12: error: ‘NUMPY_IMPORT_ARRAY_RETVAL’ undeclared (first use in this function)
193 | return NUMPY_IMPORT_ARRAY_RETVAL;
| ^~~~~~~~~~~~~~~~~~~~~~~~~
pandas/_libs/src/ujson/python/objToJSON.c:193:12: note: each undeclared identifier is reported only once for each function it appears in
pandas/_libs/src/ujson/python/objToJSON.c:194:1: warning: control reaches end of non-void function [-Wreturn-type]
194 | }
| ^
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for pandas
Running setup.py clean for pandas
Failed to build pandas
Installing collected packages: pandas
Running setup.py install for pandas ...
This is the error I am facing. I am sticking to pandas 0.23 because of my project dependencies.
I tried installing pandas with pip, pip3, pip3.6, cloning from git, with the help of source zip, still couldn't build it.
I am attaching the error file below as Stack Overflow is limiting the characters. Link to complete error
here are the packages that are installed already:
certifi==2020.6.20
cycler==0.11.0
enum34==1.1.10
importlib-resources==5.4.0
joblib== 1.1.0
kiwisolver==1.3.1
matplotlib==3.3.4
numpy==1.19.5
pandas-ml==0.6.1
Pillow==8.4.0
pip==21.2.2
pyparsing==3.0.8
python-dateutil==2.8.2
pytz==2022.1`
scikit-learn==0.21.1
scipy==1.5.4
setuptools==58.0.4
six==1.16.0
threadpoolctl==3.1.0
tqdm==4.64.1
wheel==0.37.1
zipp==3.6.0
I initially tried setting up the same environment in windows system as well as in a virtual box with ubuntu. In this both cases pandas got installed without any issue. What can be the reason for not getting installed in raspberry pi?