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

4 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

Hi:

" Pandas 2.2.3 is now compatible with Python 3.13

Pandas 2.2.3 is the first version of pandas that is generally compatible with the upcoming Python 3.13, and both wheels for free-threaded and normal Python 3.13 will be uploaded for this release."

Hey! Here’s the steps to how I check Win32 compatibility:

  1. Navigate to pandas release history: pandas · PyPI
  2. Click on the version you wish to know if it has win32 compatibility or not
  3. On the Left Hand Pane click on “Download Files”
  4. Verify if there exists a Built Distribution that matches “*-win32.whl” (it should also have a the tag “Windows x86” – the tag “Windows x86-64” will not currently properly work in a Windows 32 bit process installation).

As of this writing (Dec 9, 2024) the latest pandas version that supports Win32 is indeed 2.0.3. Support for Win32 seems to have been discontinued with pandas=2.1+

However, as it is right now, if you want to use pandas==2.0.3. You will previously need to install numpy==1.24.3 because simply installing pandas==2.0.3 will pull the latest version of numpy which is not compatible with win32 either.

Cheers!

Thanks very much! This version worked smoothly for me as well!