Python 3.12.1 32 bit unable to pip install pandas

I have pip-23.3.2

I was able to pip install numpy then I did pip install pandas and it fails:

C:\Users\samantha.king>pip install numpy
Collecting numpy
Using cached numpy-1.26.3-cp312-cp312-win32.whl.metadata (61 kB)
Using cached numpy-1.26.3-cp312-cp312-win32.whl (20.0 MB)
Installing collected packages: numpy
Successfully installed numpy-1.26.3

C:\Users\samantha.king>pip install pandas
Collecting pandas
Using cached pandas-2.1.4.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\samantha.king\AppData\Local\Temp\pip-install-mcczubuv\pandas_f5ece097960e4f8e899bb942acd6e477 C:\Users\samantha.king\AppData\Local\Temp\pip-install-mcczubuv\pandas_f5ece097960e4f8e899bb942acd6e477.mesonpy-lfszwja1\build -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --vsenv --native-file=C:\Users\samantha.king\AppData\Local\Temp\pip-install-mcczubuv\pandas_f5ece097960e4f8e899bb942acd6e477.mesonpy-lfszwja1\build\meson-python-native-file.ini
The Meson build system
Version: 1.2.1
Source dir: C:\Users\samantha.king\AppData\Local\Temp\pip-install-mcczubuv\pandas_f5ece097960e4f8e899bb942acd6e477
Build dir: C:\Users\samantha.king\AppData\Local\Temp\pip-install-mcczubuv\pandas_f5ece097960e4f8e899bb942acd6e477.mesonpy-lfszwja1\build
Build type: native build
Project name: pandas
Project version: 2.1.4

  ..\..\meson.build:2:0: ERROR: Could not find C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe

  A full log can be found at C:\Users\samantha.king\AppData\Local\Temp\pip-install-mcczubuv\pandas_f5ece097960e4f8e899bb942acd6e477\.mesonpy-lfszwja1\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.

C:\Users\samantha.king>python -m pip install pandas
Collecting pandas
Using cached pandas-2.1.4.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\samantha.king\AppData\Local\Temp\pip-install-lsj3e894\pandas_e2d25300607a48eab5cc881574aa1c54 C:\Users\samantha.king\AppData\Local\Temp\pip-install-lsj3e894\pandas_e2d25300607a48eab5cc881574aa1c54.mesonpy-1v41w7t4\build -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --vsenv --native-file=C:\Users\samantha.king\AppData\Local\Temp\pip-install-lsj3e894\pandas_e2d25300607a48eab5cc881574aa1c54.mesonpy-1v41w7t4\build\meson-python-native-file.ini
The Meson build system
Version: 1.2.1
Source dir: C:\Users\samantha.king\AppData\Local\Temp\pip-install-lsj3e894\pandas_e2d25300607a48eab5cc881574aa1c54
Build dir: C:\Users\samantha.king\AppData\Local\Temp\pip-install-lsj3e894\pandas_e2d25300607a48eab5cc881574aa1c54.mesonpy-1v41w7t4\build
Build type: native build
Project name: pandas
Project version: 2.1.4

  ..\..\meson.build:2:0: ERROR: Could not find C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe

  A full log can be found at C:\Users\samantha.king\AppData\Local\Temp\pip-install-lsj3e894\pandas_e2d25300607a48eab5cc881574aa1c54\.mesonpy-1v41w7t4\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.

Do I need to install a certain pandas version? Should I change my pip install version? Unable to install pandas though.

Tried python -m pip install pandas and still same issue.

This is because pandas does not support Python 3.12 yet. If you need pandas, use 3.11. If you need 3.12, don’t use pandas. :wink:

1 Like

Does it matter which 3.11 because there’s 3.11.0, 3.11.3., 3.11.7, etc?

That’s not true, you can see the cp312 wheels on pandas · PyPI. The problem is that it does not support 32-bit Python on Windows. @elizsk If you have a 32-bit machine, you will not be able to use Pandas. If you have a 64-bit machine (very likely), then you should use a 64-bit build of Python.

3 Likes

Oh weird, I was looking at the docs here. At least according to that, 3.12 isn’t officially supported (but maybe it’s just out of date).

@jeanas @jamestwebber 64-bit build of python worked. btw I did try 32-bit ver 3.11 and the same issue popped up when I did pip install pandas.

1 Like

I had same error and i had 3.12 installed. i remove it and tried 3.11 and it worked like a charm

I’m having the same issue. Did you solve it?
I tried installing python 11.5 for 32 bit and it didn’t work

Edit: I just solved it by installing what I think is the last version available for win32, which is pandas 2.0.3. It worked perfectly.
pip install pandas==2.0.3

2 Likes

This worked for me as well.

Hi,
Is there a shortcut way to find which 32 bit pandas version is available for py 3.11 on windows or did you try manual checking?

Thanks