对T的未解析引用

2024-09-27 07:21:21 发布

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

我在使intellij idea找到TSocket、TTransport和Tserver时遇到问题。在

enter image description here

我已经正确安装了thrift,并且能够生成我的.thrift文件。 下面是它的版本:

enter image description here

我正在将服务器中的路径自身添加到库中:

sys.path.insert(0, glob.glob('../thrift-0.10.0/lib/py/build/lib.*')[0])

在这条小路里有:

enter image description here

你知道我怎么解决这个问题吗?在


Tags: 文件path路径版本服务器libsysthrift
1条回答
网友
1楼 · 发布于 2024-09-27 07:21:21

这很可能是因为它没有认识到节俭模式。在

here

ImportError: No module named Thrift

通过转到thrift安装目录上的lib/py目录,并运行以下命令将thrift模块安装到python库中,可以轻松地解决这个问题:

sudo python setup.py install

相关问题 更多 >

    热门问题