Flask 服务于 TensorFlow
Flask serving Tensorflow
我创建了一个 flask 应用程序来为 tensorflow 模型提供服务。该应用程序在 localhost 上运行良好,但是当我想使用带有 mod_wsgi 的 apache 为它提供服务时,出现错误:
导入错误:找不到模块 Tensorflow
Tensorflow 已安装,我在简单的 python 脚本中使用了它,我在本地测试了 flask 应用程序,没有任何问题
如何在 apache2
提供的烧瓶应用程序中导入 tensorflow
为 flask 应用程序创建一个虚拟环境并在环境中安装所有包,应用程序运行良好
我创建了一个 flask 应用程序来为 tensorflow 模型提供服务。该应用程序在 localhost 上运行良好,但是当我想使用带有 mod_wsgi 的 apache 为它提供服务时,出现错误: 导入错误:找不到模块 Tensorflow Tensorflow 已安装,我在简单的 python 脚本中使用了它,我在本地测试了 flask 应用程序,没有任何问题 如何在 apache2
提供的烧瓶应用程序中导入 tensorflow为 flask 应用程序创建一个虚拟环境并在环境中安装所有包,应用程序运行良好