gpt4 book ai didi

python - 安装基于 pyproject.toml 的项目所需的错误 : Could not build wheels for pandas,

转载 作者:行者123 更新时间:2023-12-05 03:23:58 41 4
gpt4 key购买 nike

我正在尝试通过笔记本电脑上的 pip install pandas 安装 pandas。

环境:

  • Windows 11 专业版
  • python 3.10.4
  • pip 版本 22.0.4

兼容性:

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

我尝试过的:

  • 更新 pip 到 22.1.1
  • 安装轮子0.37.1
  • 卸载并安装 pip
  • 已卸载并安装 python 3.10.4

使用 pandas 1.5.1 仍可重现错误


感谢@ AKX它指出 future 没有也可能不会有 32 位版本的 pandas。 See the discussion on GitHub .

最佳答案

Pandas 不需要 Anaconda 即可工作,但根据输出中的 python310-32,您使用的是 32 位版本的 Python。

Pandas evidently不为 Python 3.10 提供 32 位轮子(尽管它们有用于 Python 3.8 和 Python 3.9 的 win32 轮子)。 (可能有预制 32 位轮子的替代来源,例如 Gohlke's site 。)

换句话说,在该平台上,您需要从源代码安装 Pandas,这可能是一项相当困难的工作,而且无论如何都不能直接在 pip 中完成(正如您通过错误:元数据生成失败)。

如果您的系统能够运行 64 位 Python,您应该切换到它。

关于python - 安装基于 pyproject.toml 的项目所需的错误 : Could not build wheels for pandas,,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/72401377/

41 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com