error de importación del módulo python

Estoy usando macports para instalar varios módulos. En general, esto funciona bien, pero a continuación se muestra un error que no consigo resolver fácilmente:

$ python Python 2.6.6 (r266:84292, Feb 12 2011, 16:57:53) [GCC 4.2.1 (Apple Inc. build 5664)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import dns >>> import opcode >>> from dns import resolver Traceback (most recent call last): File "", line 1, in  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/dns/resolver.py", line 26, in  import dns.message File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/dns/message.py", line 28, in  import dns.opcode ImportError: No module named opcode 

¿Podría ser esto un problema de ruta?

 >>> import sys >>> sys.path ['', '/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python26.zip', '/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6', '/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/plat-darwin', '/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/plat-mac', '/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/plat-mac/lib-scriptpackages', '/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-tk', '/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-old', '/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-dynload', '/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages', '/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg-info'] 

$ cat /opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/dns/ init .py [snipped comments] # init .py para la clase DNS.

 __version__ = '2.3.3' import Type,Opcode,Status,Class from Base import DnsRequest, DNSError from Lib import DnsResult from Base import * from Lib import * Error=DNSError from lazy import * Request = DnsRequest Result = DnsResult 

Gracias por adelantado.

Porque necesitas hacer:

 from dns import resolver 

Esto no funciona:

 import datetime.datetime 

Pero esto hace:

 from datetime import datetime 

Si está importando un paquete que forma parte de otro paquete, necesita usar la syntax “de”

Desinstalé py26-dnspython y reinstalé. Problema resuelto. Fink en freenode hizo la sugerencia. Gracias.