[4suite] Installation problems - 2.0?
Uche Ogbuji
uche.ogbuji at fourthought.com
Tue Sep 12 11:55:17 MDT 2000
Andy Gimblett wrote:
> Well, here comes a newbie with an installation question... I've
> just installed python2.0 from source and everything seems to be
> working happily in general - but I can't 4DOM to work. Now, I didn't
> get it to work under 1.5.2 either so maybe this is not surprising, but
> since 2.0's relatively new I thought I'd ask... Has anyone else
> out there installed vs. 2.0 and had problems?
What was the problem under 1.52? We haven't done any testing with 2.0.
> Getting specific...
>
> First let me quote an excerpt from 4DOM.spec, which was the only
> source of installation instruction I could find):
4DOM.spec is an RPM spec file for building RPM packages. ignore the
%prep and %setup. But really, all you need to do to set up 4DOM is copy
it to your PYTHONPATH.
> Now, obviously with a 2.0 installation those paths become something more
> like /usr/local/lib/python2.0/site-packages/..., but two questions remain:
Doesn't it work if you just do a
mkdir /usr/local/lib/python2.0/site-packages/xml
touch /usr/local/lib/python2.0/site-packages/xml/__init__.py
cp -r 4dom-0.9.2 /usr/local/lib/python2.0/site-packages/xml
mv /usr/local/lib/python2.0/site-packages/xml/4dom-0.9.2
/usr/local/lib/python2.0/site-packages/xml/dom
But wait a minute. What do we do with xmlsig? 4DOM uses sax, which I
understand is not in Python 2.0, (but not 1.6). However, I'm not aware
of how to make those imports.
Can anyone at xml-sig help?
Note that the changes would go in
/usr/local/lib/python2.0/site-packages/xml/dom/ext/reader
> 1. The 2.0 installation included some XML stuff, but it's installed
> to /usr/local/lib/python2.0/xml/
> not /usr/local/lib/python2.0/site-packages/xml
>
> Should I be putting my 4DOM bits in .../xml/... or
> .../site-packages/xml/... ? (More analysis below)
The latter
> 2. The "prep" section: What is setup? Part of distutils? Should I be
> worried that I have not performed this step?
Ignore them: they're RPM-specific things.
> If I install to .../xml/, and try to run the HTML demo "python
> dom_from_html_file.py employee_table.html", I get "ImportError: cannot
> import name implementation" when trying to execute "from xml.dom import
> implementation" in .../xml/dom/Node.py - and indeed there is no
> implementation.py in xml/dom...
it's not implementation.py. It's an "implementation" object in
xml/dom/__init__.py
> If I install to .../site-packages/xml/, it can't import HTMLlib from reader,
> even if there are __init__.py's all the way: I presume this is a clash
> between
> the files in .../xml and .../site-packages/xml?
Probably. Use site-packages.
We'll help as much as we can. Hopefully we'll have a chance to try out
Python 2.0 and add some instructions to our upcoming release.
--
Uche Ogbuji Principal Consultant
uche.ogbuji at fourthought.com +1 303 583 9900 x 101
Fourthought, Inc. http://Fourthought.com
4735 East Walnut St, Ste. C, Boulder, CO 80301-2537, USA
Software-engineering, knowledge-management, XML, CORBA, Linux, Python
More information about the 4suite
mailing list