I wanted to install pandas because I needed it in a python script. But when I ran the pip install pandas command, I got the following error:
Message error :
Collecting pandas
Using cached pandas-2.1.3.tar.gz (4.3 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing metadata (pyproject.toml) ... error
error: subprocess-exited-with-error
× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [12 lines of output]
+ meson setup C:\Users\titouan\AppData\Local\Temp\pip-install-2m33b6wv\pandas_d0cbd89973b2444cb852211ba74ff89a C:\Users\titouan\AppData\Local\Temp\pip-install-2m33b6wv\pandas_d0cbd89973b2444cb852211ba74ff89a\.mesonpy-1gtwaj3m\build -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --vsenv --native-file=C:\Users\titouan\AppData\Local\Temp\pip-install-2m33b6wv\pandas_d0cbd89973b2444cb852211ba74ff89a\.mesonpy-1gtwaj3m\build\meson-python-native-file.ini
The Meson build system
Version: 1.2.1
Source dir: C:\Users\titouan\AppData\Local\Temp\pip-install-2m33b6wv\pandas_d0cbd89973b2444cb852211ba74ff89a
Build dir: C:\Users\titouan\AppData\Local\Temp\pip-install-2m33b6wv\pandas_d0cbd89973b2444cb852211ba74ff89a\.mesonpy-1gtwaj3m\build
Build type: native build
Project name: pandas
Project version: 2.1.3
..\..\meson.build:2:0: ERROR: Could not parse vswhere.exe output
A full log can be found at C:\Users\titouan\AppData\Local\Temp\pip-install-2m33b6wv\pandas_d0cbd89973b2444cb852211ba74ff89a\.mesonpy-1gtwaj3m\build\meson-logs\meson-log.txt
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
So I tried to update pip but it didn't change anything. So I'd like to know how to successfully install pandas?
Regards,