suds install error: no module named client
Asked Answered
S

9

40

Trying to install suds with pip-3.2 and it fails with the error

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?

Spitzer answered 20/2, 2013 at 6:47 Comment(2)
client refers to client.py from suds.Buehler
I was receiving the same error and just did a pip install client, then pip install suds worked properlyCadaverine
B
85

According to this page, you should try running sudo pip-3.2 install suds-jurko. It looks like suds may not have been updated to work with 3.2 whereas suds-jurko has been. Hope this helps!

EDIT:

From the suds-jurko PyPI page:

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.

Buehler answered 20/2, 2013 at 7:1 Comment(6)
Worked like a charm. But how the hell do you come across this info? I really googled like hell and couldn't find anything. But thanks man.Spitzer
Now it's high enough in Google. :)Ancier
Hopefully someone will find it useful then. ;)Buehler
@JamesBrewer I am trying to install Fedex' Library which needs suds. I installed suds-jurko but it is still throwing same error. I am using Py3.2Stella
@Stella It looks like the Python Fedex library uses Python 2, so installing suds-jurko for Python 3.2 wouldn't make a difference.Buehler
suds-community works for meBonina
L
7

In python 3.7.7, you can use

pip install suds-py3

to install suds py3 package. If your code not work as expected, you can delete the suds directory in

python3.7/site-packages/

and rerun

pip install suds-py3
Lauritz answered 9/4, 2020 at 6:51 Comment(0)
C
2

Locate client.py and add its path in PYTHONPATH. This will solve your problem.

In Windows Python 3.5 it was in Python35\Lib\http. PYTHONPATH=E:\apps\Python35\Lib;E:\apps\Python35\Lib\http;

Cleavers answered 20/1, 2017 at 0:31 Comment(0)
A
1

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:

['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.

Auspicious answered 21/9, 2014 at 1:40 Comment(1)
The original suds has a slightly wacky import scheme that actually allow you to use suds.client (and other names like suds.cache) after doing an "import suds". suds-jurko cleaned up the imports, so now you need to import those names specifically. You need to do either "import suds.client" and refer to it as suds.client or "from suds import client" if you want to refer to client directly.Somewise
H
1

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.

$ sudo pip install bitbucket.org/jurko/suds/get/tip.tar.gz#egg=suds

Here is the Bitbucket Project page:

https://bitbucket.org/jurko/suds/wiki/Home

Hardly answered 12/12, 2017 at 21:12 Comment(0)
M
1

Basically there is a problem with the compatbility of suds library and python version . Your python version should be 2.7.14.

I downgraded my python version 3.6 to 2.7.14 and it worked for me.

Please let me know , if there are any further errors.

Manzanares answered 2/7, 2018 at 11:25 Comment(0)
E
-1

Often times errors like this result from an error to source .venv/bin/activate, where .venv is the location of your virtualenv.

Embosser answered 2/10, 2018 at 17:24 Comment(0)
P
-1

I was receiving the same error and just did a pip install clients, then pip install suds worked properly

Power answered 23/5 at 4:59 Comment(0)
S
-2

Maybe is too late, but you would try this:

try:
   from suds.client import Client
except ImportError:
   print('Cannot import SUDS')
Stearne answered 1/3, 2021 at 13:27 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.