You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

导入TensorFlow后FastAPI服务器无法启动问题求助

导入TensorFlow后FastAPI服务器无法启动问题求助

大家好,最近我在尝试把TensorFlow模型部署到FastAPI服务器上,但碰到了一个头疼的问题——只要我在代码里导入TensorFlow,服务器就没法正常启动。

我是通过pip3 install tensorflow-cpu命令安装的CPU版本TensorFlow,并没有使用GPU版本。

控制台里显示的内容如下:

INFO:     Will watch for changes in these directories:

INFO:     Uvicorn running on 'http://127.0.0.1:8000' (Press CTRL+C to quit)

INFO:     Started reloader process using WatchFiles

WARNING:  WatchFiles detected changes in 'main.py'. Reloading...

之后服务器就一直卡在重新加载的状态,完全没法正常运行。有没有朋友遇到过类似的情况,能给我一些解决思路吗?

备注:内容来源于stack exchange,提问作者Ramon Rasheed

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.22 12:29:31