[Python-Dev] Building PyXPCOM from Mozilla source/ImportError: cannot import name _xpcom

Mark Hammond MarkH@ActiveState.com
Wed, 5 Dec 2001 17:38:38 +1100

The correct forum for this is the Python XPCOM mailing list - details at

Please direct all followups there.

Your PYTHONPATH needs to be set so that the main "xpcom" Python package is
set on it.  This directory should have an "_xpcom.pyd" (or xpcom_d.pyd for
debug builds).  I am guessing that this .pyd simply does not exist in that

If you receive another message that you omitted mentioning, regarding a
required .dll file not being found, then the problem is likely that the PATH
is not set correctly - but it appears from your message that it is OK.

Hope this helps,

-----Original Message-----
From: python-dev-admin@python.org [mailto:python-dev-admin@python.org]On
Behalf Of Nalini Prakash
Sent: Wednesday, 5 December 2001 5:10 PM
To: python-dev@python.org
Subject: [Python-Dev] Building PyXPCOM from Mozilla source/ImportError:
cannot import name _xpcom

Apologize if this is not the right group for this question. I am trying to
build PyXPCOM from Mozilla 0.9.6 source tree on Win 2000. I have managed to
do make successfully and I can import xpcom. When I import xpcom._xpcom, I
get "ImportError: cannot import name _xpcom" and the path includes Mozilla
bin directory. The configure.html file hints at something being wrong with

How do I fix this problem?

TIA, Praki