admin管理员组文章数量:1430493
I'm trying to transfer a Flask web app to a Raspberry Pi 4b using Docker. The container runs flawlessly on AMD architecture. The ARM architecture is to be tested on the Raspberry. The creation of the image based on python3.12-bookworm and the container creation work without problems on the Raspberry. The container starts and runs. As soon as I call up a page from the website using a browser, I get the error message 'internal server error'.
The following image shows the apache2/error.log from the container.
The directory /usr/local/lib/..../pydantic_core looks like this. There are obviously problems with '_pydantic_core.cpython-312-aarch64-linux-gnu.so'. Does anyone have a solution for this problem?
meanwhile i found, that Python is missing a symbol: /usr/local/lib/python3.12/site-packages/pydantic_core/_pydantic_core.cpython-312-aarch64-linux-gnu.so: undefined symbol: PyErr_GetRaisedException. But how can i fix that?
I'm trying to transfer a Flask web app to a Raspberry Pi 4b using Docker. The container runs flawlessly on AMD architecture. The ARM architecture is to be tested on the Raspberry. The creation of the image based on python3.12-bookworm and the container creation work without problems on the Raspberry. The container starts and runs. As soon as I call up a page from the website using a browser, I get the error message 'internal server error'.
The following image shows the apache2/error.log from the container.
The directory /usr/local/lib/..../pydantic_core looks like this. There are obviously problems with '_pydantic_core.cpython-312-aarch64-linux-gnu.so'. Does anyone have a solution for this problem?
meanwhile i found, that Python is missing a symbol: /usr/local/lib/python3.12/site-packages/pydantic_core/_pydantic_core.cpython-312-aarch64-linux-gnu.so: undefined symbol: PyErr_GetRaisedException. But how can i fix that?
Share Improve this question edited Nov 19, 2024 at 18:21 Joerg55 asked Nov 19, 2024 at 13:23 Joerg55Joerg55 336 bronze badges 1- Please do not upload images of code/data/errors. Can you edit the question to include the error logs in plain text, and not a screen shot? Including a minimal reproducible example will also be essential to understanding the problem and helping to diagnose it; just an error message and file listing aren't usually enough. – David Maze Commented Nov 19, 2024 at 14:13
2 Answers
Reset to default 0When you build Docker image, then it is built for the architecture of the machine on which the build process was running.
So what you try to do is running the WS GW Interface script, based on broken dependencies...
If I were you, I'd look through my requirements file and remove any system specific requirements and allow pip to decide which to install based on the current system. Sometimes when installing dependencies, they install system specific ones. Also, I'd try removing pydanctic from my requirements file completely since it is most likely being installed as a dependent dependency.
本文标签: flaskPython Pydantic Module not found in Docker Container (Raspberry Pi)Stack Overflow
版权声明:本文标题:flask - Python Pydantic Module not found in Docker Container (Raspberry Pi) - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745559524a2663387.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论