Python Flask 应用程序 - pandas 的构建轮失败
Python Flask App - failed building wheel for pandas
我正在尝试部署一个简单的 python flask 应用程序。我过去在 requirements.txt 文件夹中部署了一个非常相似的应用程序,所有要求都相同。
在尝试使用 'git push heroku master' 将我的存储库推送到 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
所以 pandas 有一些它不喜欢的东西。
这是我的 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
我的 pandas 版本有问题吗?谁能推荐一个解决方案?
- 使用
卸载pandas
- pip 卸载pandas
- pip 安装pandas==1.2.4
尝试使用最新的 pandas 版本。 pandas==1.2.4
对我来说很好用。您还必须更新 numpy,因为它可能会产生兼容性问题。将 numpy 更新为 numpy==1.20.3
.
我正在尝试部署一个简单的 python flask 应用程序。我过去在 requirements.txt 文件夹中部署了一个非常相似的应用程序,所有要求都相同。
在尝试使用 'git push heroku master' 将我的存储库推送到 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
所以 pandas 有一些它不喜欢的东西。
这是我的 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
我的 pandas 版本有问题吗?谁能推荐一个解决方案?
- 使用 卸载pandas
- pip 卸载pandas
- pip 安装pandas==1.2.4
尝试使用最新的 pandas 版本。 pandas==1.2.4
对我来说很好用。您还必须更新 numpy,因为它可能会产生兼容性问题。将 numpy 更新为 numpy==1.20.3
.