Python suds 安装错误:没有名为客户端的模块
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/14973852/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
suds install error: no module named client
提问by lukik
Trying to install suds with pip-3.2 and it fails with the error
尝试使用 pip-3.2 安装 suds 并失败并显示错误
sudo pip-3.2 install suds
Downloading/unpacking suds
Running setup.py egg_info for package suds
Traceback (most recent call last):
File "<string>", line 16, in <module>
File "/tmp/pip-build/suds/setup.py", line 20, in <module>
import suds
File "suds/__init__.py", line 154, in <module>
import client
ImportError: No module named client
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 16, in <module>
File "/tmp/pip-build/suds/setup.py", line 20, in <module>
import suds
File "suds/__init__.py", line 154, in <module>
import client
ImportError: No module named client
Which module is this named client and how do I install it if need be?
这个命名的客户端是哪个模块,如果需要我如何安装它?
采纳答案by James Brewer
According to thispage, you should try running sudo pip-3.2 install suds-jurko. It looks like sudsmay not have been updated to work with 3.2 whereas suds-jurkohas been. Hope this helps!
根据此页面,您应该尝试运行sudo pip-3.2 install suds-jurko. 看起来suds可能尚未更新以与 3.2 一起使用,而已更新suds-jurko。希望这可以帮助!
EDIT:
编辑:
From the suds-jurkoPyPI page:
从suds-jurkoPyPI 页面:
Lightweight SOAP client (Jurko's fork).
Based on the original 'suds' project by Jeff Ortel (jortel at redhat dot com) hosted at 'https://fedorahosted.org/suds'.
'Suds' is a lightweight SOAP-based web service client for Python licensed under LGPL (see the LICENSE.txt file included in the distribution).
This is hopefully just a temporary fork of the original suds Python library project created because the original project development seems to have stalled. Should be reintegrated back into the original project if it ever gets revived again.
轻量级 SOAP 客户端(Jurko 的分支)。
基于 Jeff Ortel(在 redhat dot com 上的 jortel)在“ https://fedorahosted.org/suds”上托管的原始“suds”项目。
“Suds”是一个基于 SOAP 的轻量级 Python Web 服务客户端,在 LGPL 下获得许可(请参阅分发中包含的 LICENSE.txt 文件)。
希望这只是最初创建的 suds Python 库项目的临时分支,因为原始项目开发似乎已经停滞。如果它再次恢复,应该重新集成到原始项目中。
回答by jmrosal
I am facing the similar sort of problem. I've installed suds-jurko0.6, but when I am importing suds (import suds), and doing dir(suds) in the python3.3 shell, the output is the following:
我面临着类似的问题。我已经安装了suds-jurko0.6,但是当我在python3.3 shell中导入suds(import suds),做dir(suds)时,输出如下:
['BuildError',
'BytesIO',
'MethodNotFound',
'PortNotFound',
'Repr',
'ServiceNotFound',
'SoapHeadersNotPermitted',
'TypeNotFound',
'UnicodeMixin',
'WebFault',
'__build__',
'__builtins__',
'__cached__',
'__doc__',
'__file__',
'__initializing__',
'__loader__',
'__name__',
'__package__',
'__path__',
'__version__',
'byte_str',
'byte_str_class',
'null',
'objid',
'sys',
'tostr',
'version']
That is, python is not importing suds modules. My hackish solutions so far has been doing sys.path.append(suds.path[0]). I am not entirely happy with it, though. A more rubbost solution should be related to the ini.py file at the top of the suds package.
也就是说,python 没有导入 suds 模块。我hackish的解决方案至今一直在做sys.path.append(肥皂水。路径[0])。不过,我对此并不完全满意。一个更 rubbost 的解决方案应该与 suds包顶部的ini.py 文件相关。
回答by Jason LeMonier
Locate client.py and add its path in PYTHONPATH. This will solve your problem.
找到 client.py 并将其路径添加到 PYTHONPATH 中。这将解决您的问题。
In Windows Python 3.5 it was in Python35\Lib\http. PYTHONPATH=E:\apps\Python35\Lib;E:\apps\Python35\Lib\http;
在 Windows Python 3.5 中,它位于 Python35\Lib\http 中。PYTHONPATH=E:\apps\Python35\Lib;E:\apps\Python35\Lib\http;
回答by Johnny Gasyna
I would recommend installing the latest jurko developer's cut, which should handle an issue with recursion depth loading for big WSDL's (I ran into this with the NetSuite WSDL) This version should fix the issue.
我建议安装最新的 jurko developer's cut,它应该可以处理大型 WSDL 的递归深度加载问题(我在使用 NetSuite WSDL 时遇到了这个问题)这个版本应该可以解决这个问题。
$ sudo pip install bitbucket.org/jurko/suds/get/tip.tar.gz#egg=suds
Here is the Bitbucket Project page:
这是 Bitbucket 项目页面:
回答by Shubham Tandon
Basically there is a problem with the compatbility of suds library and python version . Your python version should be 2.7.14.
基本上是suds库和python版本的兼容性有问题。你的 python 版本应该是 2.7.14。
I downgraded my python version 3.6 to 2.7.14 and it worked for me.
我将我的 python 版本 3.6 降级到 2.7.14,它对我有用。
Please let me know , if there are any further errors.
请让我知道,如果有任何进一步的错误。
回答by mecampbellsoup
Often times errors like this result from an error to source .venv/bin/activate, where .venvis the location of your virtualenv.
很多时候,像这样的错误是由于错误导致的,你的 virtualenv 的位置source .venv/bin/activate在哪里.venv。
回答by Venusor
In python 3.7.7, you can use
在python 3.7.7中,您可以使用
pip install suds-py3
to install suds py3 package. If your code not work as expected, you can delete the suds directory in
安装 suds py3 包。如果您的代码没有按预期工作,您可以删除 suds 目录中的
python3.7/site-packages/
and rerun
并重新运行
pip install suds-py3

