首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >错误:无法为熊猫建造轮子,这需要安装pyproject.toml项目

错误:无法为熊猫建造轮子,这需要安装pyproject.toml项目
EN

Stack Overflow用户
提问于 2022-05-27 06:35:31
回答 3查看 14.1K关注 0票数 3

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

环境:

  • 窗口11 Pro
  • Python 3.10.4
  • Pip版本22.0.4

兼容性:

代码语言:javascript
运行
复制
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)

..。

代码语言:javascript
运行
复制
  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

误差仍可用熊猫1.5.1再现

参见关于GitHub的讨论. 感谢@AKX 指出,未来熊猫不会也可能不会有32位版本。

EN

回答 3

Stack Overflow用户

回答已采纳

发布于 2022-11-01 14:28:44

熊猫不需要Anaconda来工作,但是根据您的输出中的python310-32,您正在使用32位的Python构建。

熊猫显然没有为Python3.10提供32位轮子(不过,它们有用于Python3.8和Python3.9的win32轮子)。(预制件32位车轮可能有替代来源,如戈尔克氏遗址。)

换句话说,在该平台上,您需要从源代码中安装Pandas,这可能是一项相当困难的工作,而且无论如何也不能直接在pip内完成(正如您通过error: metadata-generation-failed注意到的那样)。

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

票数 2
EN

Stack Overflow用户

发布于 2022-08-12 06:35:54

用Python3.10安装熊猫

代码语言:javascript
运行
复制
python -m pip install pandas
票数 0
EN

Stack Overflow用户

发布于 2022-09-14 10:43:10

第一步

下载熊猫轮,选择一个适合您的操作系统

第二步

从绝对路径安装车轮

代码语言:javascript
运行
复制
pip install pandas-1.4.2-cp310-cp310-win32.whl

第三步

你已经成功安装了熊猫

代码语言:javascript
运行
复制
import pandas
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/72401377

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档