H2O:无法运行\u tcp_客户端.sh(示例)_客户端.py)用DriverlessAI的记分员.zip

2024-09-30 00:23:10 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在使用DriverlessAI(带有H2O.ai)并尝试使用scorer(这是一个由DriverlessAI生成的诊断模型),但是发生了一个错误。你知道吗

运行\u tcp时_客户端.sh,错误 “文件”示例_客户端.py,第5行,在 从节俭进口节俭 ModuleNotFoundError:没有名为“thrift”的模块 已经发生了。你知道吗

在文档(https://www.h2o.ai/wp-content/uploads/2017/09/driverlessai/scoring-package.html)中写的是,运行\u tcp就足够了_客户端.sh运行\u tcp之后_服务器.sh是的

我能怎么办?你知道吗


Tags: 模块文件py客户端示例sh错误thrift
1条回答
网友
1楼 · 发布于 2024-09-30 00:23:10

您需要按照链接的documentation安装Thrift:

The following are required in order to run the scoring package. [..] Apache Thrift (to run the TCP scoring service)

Installing Thrift

Thrift is required to run the scoring service in TCP mode, but it is not required to run the scoring module. The following steps are available on the Thrift documentation site at: https://thrift.apache.org/docs/BuildingFromSource.

$ sudo apt-get install automake bison flex g++ git libevent-dev \
  libssl-dev libtool make pkg-config libboost-all-dev ant
$ wget https://github.com/apache/thrift/archive/0.10.0.tar.gz
$ tar -xvf 0.10.0.tar.gz
$ cd thrift-0.10.0
$ ./bootstrap.sh
$ ./configure
$ make
$ sudo make install

@编辑:

请检查是否可以运行(在包含这些脚本的文件夹中):

$ source client_env/bin/activate
$ python -c 'from thrift.transport import TSocket'

如果出现相同的异常,请运行:

pip install -r client_requirements.txt

然后再次尝试运行脚本。你知道吗

相关问题 更多 >

    热门问题