部署Django/Python应用到Heroku时出现‘构建Wheel依赖项错误’的问题求助
部署Django/Python应用到Heroku时出现‘构建Wheel依赖项错误’的问题求助
我正在尝试把我的Django应用部署到Heroku,结果遇到了下面的错误输出:
Installing build dependencies: started Installing build dependencies: finished with status 'done' Getting requirements to build wheel: started Getting requirements to build wheel: finished with status 'error' error: subprocess-exited-with-error × Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> [24 lines of output] Traceback (most recent call last): File "/app/.heroku/python/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module> main() ~~~~^^ File "/app/.heroku/python/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main json_out['return_val'] = hook(**hook_input['kwargs']) ~~~~^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/.heroku/python/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel return hook(config_settings) File "/tmp/pip-build-env-zgoqdfmt/overlay/lib/python3.13/site-packages/setuptools/build_meta.py", line 334, in get_requires_for_build_wheel return self._get_build_requires(config_settings, requirements=[]) ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/tmp/pip-build-env-zgoqdfmt/overlay/lib/python3.13/site-packages/setuptools/build_meta.py", line 304, in _get_build_requires self.run_setup() ~~~~~~~~~~~~~~^^ File "/tmp/pip-build-env-zgoqdfmt/overlay/lib/python3.13/site-packages/setuptools/build_meta.py", line 522, in run_setup super().run_setup(setup_script=setup_script) ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/tmp/pip-build-env-zgoqdfmt/overlay/lib/python3.13/site-packages/setuptools/build_meta.py", line 320, in run_setup exec(code, locals()) ~~~~^^^^^^^^^^^^^^^^ File "<string>", line 29, in <module> File "<string>", line 26, in get_version KeyError: '__version__' [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error × Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> See above for output. note: This error originates from a subprocess, and is likely not a problem with pip. ! Error: Unable to install dependencies using pip. ! ! See the log output above for more information. ! Push rejected, failed to compile Python app. ! Push failed
我之前试过参考Stack Overflow上类似的帖子,升级了Wheel和Setuptools,但问题还是没解决。有没有大佬知道这可能是什么问题?
备注:内容来源于stack exchange,提问作者George Bealby
相关产品推荐
相关产品推荐

