
Brad Clements wrote:
I have lxml 0.8 compiled with the latest windows binaries from
http://xmlsoft.org/sources/win32/
python selftest.py passes, but python test.py fails oddly.
E:\prj\src\lxml-0.8>python test.py Traceback (most recent call last): File "test.py", line 591, in ? exitcode = main(sys.argv) File "test.py", line 554, in main test_cases = get_test_cases(test_files, cfg, tracer=tracer) File "test.py", line 254, in get_test_cases module = import_module(file, cfg, tracer=tracer) File "test.py", line 197, in import_module mod = __import__(modname) File "E:\prj\src\lxml-0.8\src\lxml\tests\test_errors.py", line 9, in ? from lxml import etree ImportError: cannot import name etree
Did you run python setup.py build_ext -i before this, just as the Makefile does? This builds the etree extension in-place, i.e. in the source directory. test.py uses "src/" in its PYTHONPATH, so the lxml package in src/ will be found, but if you did not build in-place, the etree extension will be missing. Stefan