I get this error message whenever I try installing pandas library:
C:\Windows\system32>pip install pandas
Defaulting to user installation because normal site-packages is not writeable
Collecting pandas
Using cached pandas-2.1.1.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\User\AppData\Local\Temp\pip-install-ep3pfy9e\pandas_204be4fbdfdb4eef8e68ac98d10382d7 C:\Users\User\AppData\Local\Temp\pip-install-ep3pfy9e\pandas_204be4fbdfdb4eef8e68ac98d10382d7\.mesonpy-2lj4p08p\build -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --vsenv --native-file=C:\Users\User\AppData\Local\Temp\pip-install-ep3pfy9e\pandas_204be4fbdfdb4eef8e68ac98d10382d7\.mesonpy-2lj4p08p\build\meson-python-native-file.ini
The Meson build system
Version: 1.2.1
Source dir: C:\Users\User\AppData\Local\Temp\pip-install-ep3pfy9e\pandas_204be4fbdfdb4eef8e68ac98d10382d7
Build dir: C:\Users\User\AppData\Local\Temp\pip-install-ep3pfy9e\pandas_204be4fbdfdb4eef8e68ac98d10382d7\.mesonpy-2lj4p08p\build
Build type: native build
Project name: pandas
Project version: 2.1.1
..\..\meson.build:2:0: ERROR: Could not parse vswhere.exe output
A full log can be found at C:\Users\User\AppData\Local\Temp\pip-install-ep3pfy9e\pandas_204be4fbdfdb4eef8e68ac98d10382d7\.mesonpy-2lj4p08p\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.
I tried upgrading pip but still didn't work
I tried installing Visual Studio installer packages but still it hasn't worked
I was running into the same issue today and I may have a temporary solution for you.
pip install pandas==2.0.3
Version 2.1.1 failed to install for me and I couldn't find a satisfactory answer after a little research. But installing an earlier version from the ones listed here seems to be a workaround. Hope this helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With