【问题标题】:Python Flask App - failed building wheel for pandasPython Flask App - 为熊猫构建失败的轮子
【发布时间】:2021-06-13 15:37:09
【问题描述】:

我正在尝试部署一个简单的 python 烧瓶应用程序。我过去部署了一个非常相似的应用程序,在 requirements.txt 文件夹中具有所有相同的要求。

在尝试使用 'git push heroku master' 将我的 repo 推送到 heroku 时,heroku 做了它的事情并最终给出了以下错误:

remote:        ERROR: Failed building wheel for pandas
remote:        Successfully built numpy
remote:        Failed to build pandas
remote:        ERROR: Could not build wheels for pandas which use PEP 517 and cannot be installed directly
remote:  !     Push rejected, failed to compile Python app.
remote: 
remote:  !     Push failed
remote: Verifying deploy...
remote: 
remote: !   Push rejected to isitdry.
remote: 
To https://git.heroku.com/isitdry.git

所以它不喜欢熊猫。

这是我的 requirements.txt 的样子:

certifi==2020.6.20
chardet==3.0.4
click==7.1.2
Flask==1.1.2
gunicorn==20.0.4
idna==2.10
itsdangerous==1.1.0
Jinja2==2.11.2
MarkupSafe==1.1.1
numpy==1.19.2
pandas==1.1.2                 # here is the problem!
python-dateutil==2.8.1
pytz==2020.1
requests==2.24.0
six==1.15.0
urllib3==1.25.10
Werkzeug==1.0.1

我的熊猫版本有问题吗?谁能推荐一个解决方案?

【问题讨论】:

    标签: python pandas flask heroku


    【解决方案1】:

    尝试使用最新的 pandas 版本。 pandas==1.2.4 对我来说很好。您还必须更新 numpy,因为它可能会产生兼容性问题。将 numpy 更新为 numpy==1.20.3

    【讨论】:

    • 这两个和我一起工作。谢谢。
    【解决方案2】:
    1. 使用卸载 pandas
    2. pip 卸载熊猫
    3. pip install pandas==1.2.4

    【讨论】:

      猜你喜欢
      • 2020-12-28
      • 2017-09-11
      • 2016-11-14
      • 2022-01-10
      • 1970-01-01
      • 2019-12-07
      • 2020-06-11
      • 2018-01-07
      • 2017-03-17
      相关资源
      最近更新 更多