Namecheap CPanel(Python应用)安装Python包遇问题求助
Flask应用部署问题求助
1. 依赖安装错误
使用requirements.txt安装依赖时出现以下错误:
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: 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.
2. requirements.txt内容
firebase firebase_admin Flask Flask_Cors pypdfium2 Pyrebase4 Werkzeug
3. 手动运行应用的语法错误
手动启动应用时触发语法错误:
[kazehoya@server145 flask-server]$ python server.py File "server.py", line 47 doc_ref = db.collection("admins").document(f"{admin.uid}") SyntaxError: invalid syntax [kazehoya@server145 flask-server]$
注:该应用在本地环境运行完全正常。
4. 手动安装单个依赖的错误
尝试执行python -m pip install firebase时出现回溯错误:
Traceback (most recent call last): File "/usr/lib64/python2.6/runpy.py", line 122, in _run_module_as_main "__main__", fname, loader, pkg_name) File "/usr/lib64/python2.6/runpy.py", line 34, in _run_code exec code in run_globals File "/home/kazehoya/newcorny.kazemo.shop/newcorny.kazemo.shop/flask-server/pip.py", line 29, in "This script does not work on Python {}.{}".format(*this_python), ValueError: zero length field name in format
9月5日更新
已解决pip运行问题,但仍存在wheel构建失败错误。附上Python应用页面截图:
恳请提供帮助!😊
内容的提问来源于stack exchange,提问作者aadrian
相关产品推荐
相关产品推荐

