Home > Mobile >  Pip3 is not working Python 3.10 for pandas installation
Pip3 is not working Python 3.10 for pandas installation

Time:09-01

I am trying to install pandas library for python with pip but I get this error. I don't understand how to fix, can someone help me?

pi@raspberrypi:~/Desktop $ pip3 install pandas

Collecting pandas==1.3.0                                                                                   Using cached pandas-1.3.0.tar.gz (4.7 MB)
Installing build dependencies ... error
error: subprocess-exited-with-error
× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> [1350 lines of output]

[...] 1000 lines of stuff

rgument is of type ‘npy_longdouble *’ {aka ‘double *’}
             __MATHCALL (modf,, (_Mdouble_ __x, _Mdouble_ *__iptr)) __nonnull ((2));
             ^
            error: Command "gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall
-fPIC -DNPY_INTERNAL_BUILD=1 -DHAVE_NPY_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -DHAVE_CBLAS -DNO_ATLAS_INFO=-1 -Ibuild/src.linux-armv7l-3.10/numpy/core/src/umath -Ibuild/src.linux-armv7l-3.10/numpy/core/src/npymath -Ibuild/src.linux-armv7l-3.10/numpy/core/src/common -Inumpy/core/include -Ibuild/src.linux-armv7l-3.10/numpy/core/include/numpy -Inumpy/core/src/common -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -I/usr/local/include/python3.10 -Ibuild/src.linux-armv7l-3.10/numpy/core/src/common -Ibuild/src.linux-armv7l-3.10/numpy/core/src/npymath -c build/src.linux-armv7l-3.10/numpy/core/src/multiarray/scalartypes.c -o build/temp.linux-armv7l-3.10/build/src.linux-armv7l-3.10/numpy/core/src/multiarray/scalartypes.o -MMD -MF build/temp.linux-armv7l-3.10/build/src.linux-armv7l-3.10/numpy/core/src/multiarray/scalartypes.o.d -std=c99" failed with exit status 1
            [end of output]
     
        note: This error originates from a subprocess, and is likely not a problem with pip.
        ERROR: Failed building wheel for numpy
      Failed to build numpy
      ERROR: Could not build wheels for numpy, which is required to install pyproject.toml-based projects      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

CodePudding user response:

Did you try to install numpy first in case you had an incompatible version?

pip install numpy

CodePudding user response:

Try using the below code instead of pip3 install pandas

  1. pip install pandas

or

  1. pip install pandas=1.4.4
  • Related