[Pygoogle-discuss] newbie complaint: missing package __init__.py
Brought to you by:
bluecoat93
From: John R. <joh...@gm...> - 2005-04-20 04:14:39
|
Hi. I just installed the pygoogle package with setup.py install home=3D.... and noticed that it put a directory named pygoogle in the sys.path directory I said. However, the pygoogle didn't contain a __init__.py file, so it wasn't recognized as a package, and I couldn't import from it. You should just add an empty __init__.py file, as I do below: % python Python 2.4 (#1, Nov 30 2004, 11:25:14)=20 [GCC 3.4.2 20041017 (Red Hat 3.4.2-6.fc3)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from pygoogle import google Traceback (most recent call last): File "<stdin>", line 1, in ? ImportError: No module named pygoogle % touch lib/python/pygoogle/__init__.py % python Python 2.4 (#1, Nov 30 2004, 11:25:14)=20 [GCC 3.4.2 20041017 (Red Hat 3.4.2-6.fc3)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from pygoogle import google /home/jtr/pagebites/trunk/build/lib/python/pygoogle/google.py:58: Deprecati= onWar ning: SOAPpy not imported. Trying legacy SOAP.py. import GoogleSOAPFacade >>> # i.e. it works. Well enough. |