Reputation: 8037
I'm trying to install pandas via pip install pandas
on my laptop.
Environment:
Compatibility:
C:\Users\PC>pip install pandas
WARNING: Ignoring invalid distribution -ywin32 (c:\users\pc\appdata\local\programs\python\python310-32\lib\site-packages)
WARNING: Ignoring invalid distribution -ywin32 (c:\users\pc\appdata\local\programs\python\python310-32\lib\site-packages)
Collecting pandas
Using cached pandas-1.4.2.tar.gz (4.9 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: numpy>=1.21.0 in c:\users\pc\appdata\local\programs\python\python310-32\lib\site-packages (from pandas) (1.22.4)
Requirement already satisfied: python-dateutil>=2.8.1 in c:\users\pc\appdata\local\programs\python\python310-32\lib\site-packages (from pandas) (2.8.2)
Collecting pytz>=2020.1
Using cached pytz-2022.1-py2.py3-none-any.whl (503 kB)
Requirement already satisfied: six>=1.5 in c:\users\pc\appdata\local\programs\python\python310-32\lib\site-packages (from python-dateutil>=2.8.1->pandas) (1.16.0)
Building wheels for collected packages: pandas
Building wheel for pandas (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for pandas (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [2010 lines of output]
C:\Users\PC\AppData\Local\Temp\pip-build-env-q3kdt5nb\overlay\Lib\site-packages\setuptools\config\setupcfg.py:459: SetuptoolsDeprecationWarning: The license_file parameter is deprecated, use license_files instead.
warnings.warn(msg, warning_class)
...
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for pandas
Failed to build pandas
ERROR: Could not build wheels for pandas, which is required to install pyproject.toml-based projects
What I have tried:
Error still reproducible with pandas 1.5.1
Thanks to @AKX which has pointed up that there is no and may will no 32-bit version of pandas in the future. See the discussion on GitHub.
Upvotes: 20
Views: 109914
Reputation: 1
I solved the problem by lowering the python version from 3.10 to 3.9. Maybe you can have a try!
Upvotes: 0
Reputation: 11
the problem i had was error on microsoft visiual, mention befor the error of wheel of panda, needed the package of that before install pandas with pip install. now after install the microsoft visiual then use pip install panda and then pip install transform i had no errors.
Upvotes: 1
Reputation: 168814
Pandas doesn't require Anaconda to work, but based on python310-32
in your output, you're using a 32-bit build of Python.
Pandas evidently does not ship 32-bit wheels for Python 3.10 (they do have win32 wheels for Python 3.8 and Python 3.9 though). (There could be alternate sources for pre-built 32-bit wheels, such as Gohlke's site.)
In other words, on that platform you would need to install Pandas from source, which will likely be a rather difficult undertaking, and can't be done directly within pip
anyway (as you noticed via error: metadata-generation-failed
).
If your system is capable of running 64-bit Python, you should switch to it.
Upvotes: 10
Reputation: 31
Download pandas wheel, Choose one that suits your operating system
install the wheel from absolute path
pip install pandas-1.4.2-cp310-cp310-win32.whl
You had successful installed pandas Check it
import pandas
Upvotes: 3