我试图在python3中安装SOAPpy库。我得到以下错误
"/../Downloads/SOAPpy-0.11.6/SOAPpy/__init__.py", line 3, in <module>
from version import __version__
ModuleNotFoundError: No module named 'version'我试着安装其他帖子中建议的另一种选择,例如zeep。但是我必须使用的url中有soap,并且没有使用其他的替代品。
下面是我在这里使用的示例脚本
#!/usr/bin/python
import string
import hashlib
from SOAPpy import WSDL ## for extracting the URL of the endpoint (server script) from the WSDL file
from SOAPpy import SOAPProxy ## for usage without WSDL file
#1) Usage with WSDL (for extracting the URL of the endpoint)
wsdl = "https://www.brenda-enzymes.org/soap/brenda.wsdl"
password = hashlib.sha256("myPassword").hexdigest()
client = WSDL.Proxy(wsdl)
parameters = "j.doe@example.edu,"+password+",ecNumber*1.1.1.1#organism*Homo sapiens#"
resultString = client.getKmValue(parameters)
print resultString我想就如何解决这一问题征求意见。
发布于 2019-06-27 06:47:33
version模块是SOAPpy包的一部分,但是在Python3中,您需要使用绝对导入,从SOAPpy.version导入版本或从init安装程序包文件中的.version导入版本。代码也会有其他问题。
下面是一个支持SOAPpy for python3 https://pypi.org/project/SOAPpy-py3/的链接
https://stackoverflow.com/questions/56480825
复制相似问题