使用 Django Docker 环境部署新的 Heroku 应用时
在我的 requirements.txt 中
我有
openai==0.11.0
做的时候
git push heroku master
在构建期间我得到这个错误
Building wheel for pandas (pyproject.toml): finished with status 'error'
error: subprocess-exited-with-error
× Building wheel for pandas (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [1803 lines of output]
gcc: fatal error: cannot execute 'cc1plus': execvp: No such file or directory
compilation terminated.
error: command '/usr/bin/gcc' failed with exit code 1
[end of output]
Building wheel for numpy (pyproject.toml): finished with status 'error'
error: subprocess-exited-with-error
× Building wheel for numpy (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [251 lines of output]
RuntimeError: Broken toolchain: cannot link a simple C++ program. note: A compiler with support for C++11 language features is required.
[end of output]
非常感谢任何帮助。谢谢你
最佳答案
添加
RUN apk add g++ postgresql-dev cargo gcc python3-dev libffi-dev
到 Dockerfile.web 解决了这个问题
关于python - 如何修复 Heroku Openai Django 部署错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71528637/