【问题标题】:Installing SOAPpy in Python 3在 Python 3 中安装 SOAPpy
【发布时间】:2019-06-06 15:32:38
【问题描述】:

我正在尝试在 python 3 中安装 SOAPpy 库。我收到以下错误

"/../Downloads/SOAPpy-0.11.6/SOAPpy/__init__.py", line 3, in <module>
    from version import __version__
ModuleNotFoundError: No module named 'version'

我尝试安装其他帖子中建议的其他替代方案,例如齐普。但是我必须使用的网址中有 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

我想就如何解决这个问题寻求建议。

【问题讨论】:

    标签: python-3.x soap client soappy


    【解决方案1】:

    版本模块是 SOAPpy 包的一部分,但在 Python 3 中,您需要使用绝对导入,从 SOAPpy.version import version 或 from .version import version 在您的 init 安装程序包文件中。代码也会有其他问题。

    这是一个支持 SOAPpy for python3 的链接 https://pypi.org/project/SOAPpy-py3/

    【讨论】:

      猜你喜欢
      • 2010-11-27
      • 2014-10-23
      • 2014-03-17
      • 2012-06-18
      • 2011-09-23
      • 2018-10-22
      • 2018-04-02
      • 2015-02-11
      • 2014-05-21
      相关资源
      最近更新 更多