samuel oketch
samuel oketch

Reputation: 41

Unable to install pandas library - "..\..\meson.build:2:0: ERROR: Could not parse vswhere.exe output"

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

Upvotes: 4

Views: 7972

Answers (3)

abdullah
abdullah

Reputation: 108

Either you need to Change Python version to 64 Bit version or install an older version of pandas anything before 2.1 will do

Upvotes: 0

Zishe Schnitzler
Zishe Schnitzler

Reputation: 311

The problem is that you are using a 32-bit version of python and pandas does not work on 32-bit since version 2.1 as they now require PyArrow as prerequisite and PyArrow doesn’t support 32-bit which you can confirm via pip install pyarrow. So @A.Raamiz solution is the best.

Upvotes: 5

A.Raamiz
A.Raamiz

Reputation: 91

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.

Upvotes: 9

Related Questions