Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUILD: Unable to install pandas on 32bit python due to mesons build error which requires x86_64. will not allow x86 (32 bit version of python 3.12) #58134

Closed
1 task done
BethDal opened this issue Apr 3, 2024 · 5 comments
Labels
Build Library building on various platforms

Comments

@BethDal
Copy link

BethDal commented Apr 3, 2024

Installation check

Platform

Windows-10-10.0.19045-SP0

Installation Method

pip install

pandas Version

2.2.1

Python Version

3.12

Installation Logs

PS C:\Users\lineop\Documents\Python\1.BERTsuite_Nov2023\VcmMET3> py -m pip install pandas
Defaulting to user installation because normal site-packages is not writeable
Collecting pandas
Using cached pandas-2.2.1.tar.gz (4.4 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
╰─> [23 lines of output]
+ meson setup C:\Users\lineop.LI\AppData\Local\Temp\pip-install-o0ah6jbr\pandas_8176c5fd1a53489cadec284792bf22d6 C:\Users\lineop.LI\AppData\Local\Temp\pip-install-o0ah6jbr\pandas_8176c5fd1a53489cadec284792bf22d6.mesonpy-1
alb6x3l\build -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --vsenv --native-file=C:\Users\lineop.LI\AppData\Local\Temp\pip-install-o0ah6jbr\pandas_8176c5fd1a53489cadec284792bf22d6.mesonpy-1alb6x3l\build\meson-python-n
ative-file.ini
The Meson build system
Version: 1.2.1
Source dir: C:\Users\lineop.LI\AppData\Local\Temp\pip-install-o0ah6jbr\pandas_8176c5fd1a53489cadec284792bf22d6
Build dir: C:\Users\lineop.LI\AppData\Local\Temp\pip-install-o0ah6jbr\pandas_8176c5fd1a53489cadec284792bf22d6.mesonpy-1alb6x3l\build
Build type: native build
Project name: pandas
Project version: 2.2.1
Activating VS 17.9.4
C compiler for the host machine: cl (msvc 19.39.33523 "Microsoft (R) C/C++ Optimizing Compiler Version 19.39.33523 for x64")
C linker for the host machine: link link 14.39.33523.0
C++ compiler for the host machine: cl (msvc 19.39.33523 "Microsoft (R) C/C++ Optimizing Compiler Version 19.39.33523 for x64")
C++ linker for the host machine: link link 14.39.33523.0
Cython compiler for the host machine: cython (cython 3.0.5)
Host machine cpu family: x86_64
Host machine cpu: x86_64

Program python found: YES (C:\Program Files (x86)\Python312-32\python.exe)
Need python for x86_64, but found x86
Run-time dependency python found: NO (tried sysconfig)

  ..\..\pandas\_libs\tslibs\meson.build:32:7: ERROR: Python dependency not found
 
  A full log can be found at C:\Users\lineop.LI\AppData\Local\Temp\pip-install-o0ah6jbr\pandas_8176c5fd1a53489cadec284792bf22d6\.mesonpy-1alb6x3l\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.

@BethDal BethDal added Build Library building on various platforms Needs Triage Issue that has not been reviewed by a pandas team member labels Apr 3, 2024
@BethDal
Copy link
Author

BethDal commented Apr 3, 2024

My application is to measure data from a I2C board that uses a .dll file compiled at 32-bit, so 32-bit python MUST be used.
Error when pip install pandas. Meson build requires python x86_64 but I have only x86 (32bit) installed in order to be comatible with my board. Not sure which back version of pandas is compatible with 32 bit. All version listed for windows are 64bit.

Note: I am Running Pycharm behind a firewall, so not all python library websites are on my approved list. These can be added

@WillAyd
Copy link
Member

WillAyd commented Apr 4, 2024

So you are trying to build a 32 bit application on a 64 bit build system right? Technically meson allows for this, but I don't think that is supported in meson-python just yet. See mesonbuild/meson-python#321

@WillAyd WillAyd removed the Needs Triage Issue that has not been reviewed by a pandas team member label Apr 4, 2024
@rgommers
Copy link
Contributor

rgommers commented May 3, 2024

This is supported. What you have to do is ensure you are activating 32-bit MSVC, because Meson isn't going to do that automatically for you just because you're using a 32-bit Python (it's not a Python-specific build system, so that would be too magical). Here is how:

https://github.com/numpy/numpy/blob/aa0cc043d1fe51e61024842b21905e11a2a4cee6/.github/workflows/wheels.yml#L107-L111

and ensure you pass --vsenv as a setup argument to select MSVC, e.g.:

https://github.com/numpy/numpy/blob/aa0cc043d1fe51e61024842b21905e11a2a4cee6/pyproject.toml#L180

@uvna
Copy link

uvna commented Jun 5, 2024

Thanks to the hint above, opening "x86 Native Tools Command Prompt for VS 2022" to select the 32-bit MSVC compiler followed by pip install pandas worked.

@mroeschke
Copy link
Member

Closing as a solution was provided

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Build Library building on various platforms
Projects
None yet
Development

No branches or pull requests

5 participants