By default (if you haven't specified multi-version mode), easy_installing an egg will add an entry to the easy-install.pth
file in site-packages. Check there to see if there's a reference to the suds egg. You can also check the Python import path (which is the list of places Python will search for modules) like this:
import sys
print sys.path
Did you try import suds
in a Python shell that was started before you easy_installed suds?
That would explain the behaviour you saw. The .pth
files are only read at Python startup, so the egg directory or zip file wouldn't have appeared in sys.path
. Copying the suds
dir from inside the egg directory worked because site-packages
itself was already in sys.path
. So make sure you restart Python after installing an egg.
Python will import from zip archives, but it won't unzip the archive into site-packages. That is, it won't leave the unzipped directory there after you import. (I think it reads from the zip file in-place without extracting it anywhere in the file system.) I've seen problems where some packages didn't work as zipped eggs (they tried to read data from their location in the file-system), so I'd recommend always using the --always-unzip flag as you do in (2).
You haven't given the command lines you used. Did you specify the -m option to easy_install? That will cause the egg to be installed in multi-version mode. It won't be in sys.path by default, and you'd need to use the pkg_resources.require
function before trying to import it.