卡桑德拉集群pyinstaller不工作时

2024-04-19 19:46:56 发布

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

我尝试在Mac上使用pyinstaller为一个简单的python文件创建可执行文件测试音频.py,其中包含

from cassandra.cluster import Cluster

运行可执行文件时出现以下错误:

TestAudit.py:7: DeprecationWarning: Using or importing the ABCs from
'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
Traceback (most recent call last):
  File "TestAudit.py", line 7, in <module>
  File "cassandra/cluster.py", line 23, in init cassandra.cluster
ModuleNotFoundError: No module named 'concurrent'
[46470] Failed to execute script TestAudit

我的Python版本是python3.7.3 Mac:MacOS High Sierra,版本10.13.6

如果有人知道如何解决这个问题,请帮忙,否则我们怎么打包测试音频.py还有依赖关系?你知道吗

你知道吗测试音频.py文件:

"""Program to initialze Cassandra driver"""
from cassandra.cluster import Cluster
from datetime import datetime
print("now =", datetime.now())

Tags: infrompyimport可执行文件datetimemacline