[XML-SIG] PyXML installation in Zope2.8.5

5 views
Skip to first unread message

Sudesh Soni

unread,
Nov 17, 2009, 11:50:22 AM11/17/09
to xml...@python.org
Hi,
 
Product - zope 2.8.5 final [python version - 2.3.5]
 
I get following error when executing -
 
python setup.py build
 
============
running build_ext
error: Python was built with version 6 of Visual Studio, and extensions need to be built with the sa
me version of the compiler, but it isn't installed.
==============
Help!
 
Regards
 
 

Sudesh Soni

unread,
Nov 17, 2009, 11:54:13 AM11/17/09
to xml...@python.org
The version of PyXML is 0.8.4


From: Sudesh Soni <soni...@yahoo.com>
To: xml...@python.org
Sent: Tue, November 17, 2009 11:50:22 AM
Subject: PyXML installation in Zope2.8.5

Mike Brown

unread,
Nov 17, 2009, 11:18:41 PM11/17/09
to Sudesh Soni, xml...@python.org
PyXML has two 'extension' modules (modules written in C instead of Python):

_xmlplus.parsers.pyexpat (needed by PyExpat)
_xmlplus.parsers.sgmlop (needed by sgmlop)

After they're built and installed, they become accessible as
xml.parsers.pyexpat and xml.parsers.sgmlop, respectively.

You can't build Python C extension modules without a C compiler, and, for
reasons we must just accept, it has to be the same compiler that was used to
make the Python executable you're using. You apparently don't have the
compiler you need installed. Maybe you don't have one at all. That's why you
got the error message. The compiler you're being told you need is Visual
Studio 6 / VC6, which is old but not free (officially). This also suggests
you're using Windows, so it's probably worth mentioning whether you're using
ActiveState's Python or the official python.org distribution, as it can make a
difference when people try to help you.

But first I would take a step back and ask why you need PyXML.
Which component of PyXML do you think you need, and why?

You mentioned Zope. AFAIK, PyXML is only needed for Martijn Faassen's "XPath
Methods" product. That product relies on PyXML and the venerable 4Suite
0.11.1. Is this why you're trying to get PyXML installed? You might be better
off looking for a Zope product which gives you access to ElementTree, if not
lxml.etree.

My ability to help you, in any case, is going to be limited. I just wanted
to help you understand the error message and get you to explain more about
what you're trying to accomplish.

Sudesh Soni wrote:
> The version of PyXML is 0.8.4

> Product - zope 2.8.5 final [python version - 2.3.5]
> I get following error when executing -
>
> python setup.py build
>
> ============
> running build_ext
> error: Python was built with version 6 of Visual Studio, and extensions need

> to be built with the same version of the compiler, but it isn't installed.
_______________________________________________
XML-SIG maillist - XML...@python.org
http://mail.python.org/mailman/listinfo/xml-sig

Dieter Maurer

unread,
Nov 18, 2009, 1:35:10 AM11/18/09
to Sudesh Soni, xml...@python.org
Sudesh Soni wrote at 2009-11-17 08:50 -0800:
>Product - zope 2.8.5 final [python version - 2.3.5]
>
>I get following error when executing -
>
>python setup.py build
>
>============
>running build_ext
>error: Python was built with version 6 of Visual Studio, and extensions need to be built with the sa
>me version of the compiler, but it isn't installed.

"PyXML" contains extensions written in "C".
When you build "PyXML" yourself, these extensions need to be compiled.
To be compatible with Python, these compilations need to use essentially
the same compiler as the one used for Python. Your observed error:
The required compiler (version 6 of Visual Studio) is not available on
your system.

Almost surely, there are prebuilt "PyXML" binaries for Windows.
Your easiest option is to install one of them
and do not try to build "PyXML" yourself.

--
Dieter

Sudesh Soni

unread,
Nov 18, 2009, 11:14:32 AM11/18/09
to Dieter Maurer, xml...@python.org
Thanks Dieter,
 
Other than gzip file and I could find an exe for PYXML installation , but the problem is that, during installation it cannot locate the python2.3 that is in zope 2.8 itself, instead it looks in the windows registry.
Suggest.
 
Regards
Sudesh


From: Dieter Maurer <die...@handshake.de>
To: Sudesh Soni <soni...@yahoo.com>
Cc: xml...@python.org
Sent: Wed, November 18, 2009 1:35:10 AM
Subject: Re: [XML-SIG] PyXML installation in Zope2.8.5

Sudesh Soni

unread,
Nov 18, 2009, 11:23:29 AM11/18/09
to Mike Brown, xml...@python.org
Thanks Mike for valuable information.
 
The python version is 2.3.5 that comes along with Zope.
I am trying to use ZSI 2.0 [Zope Solera Interface] with my zope server to be able to utilize web services. During the installation of this package it looks for PyXML, so I downloaded PyXML and got stuck with issue. I have not researched which part of PyXML is needed in ZSI, but I will try to find out.
 
Regards
Sudesh
 
 


From: Mike Brown <mi...@skew.org>
Sent: Tue, November 17, 2009 11:18:41 PM

Subject: Re: [XML-SIG] PyXML installation in Zope2.8.5

Dieter Maurer

unread,
Nov 19, 2009, 2:14:28 AM11/19/09
to Sudesh Soni, xml...@python.org
Sudesh Soni wrote at 2009-11-18 08:14 -0800:
>Thanks Dieter,
>
>Other than gzip file and I could find an exe for PYXML installation , but the problem is that, during installation it cannot locate the python2.3 that is in zope 2.8 itself, instead it looks in the windows registry.
>Suggest.

I am sure there is a workaround. Unfortunately, I am no Windows expert...

Under *nix, I have seen a similar situation and approached it as follows:

Situation: Operating system distributions often come with their own
python package and associated extension packages. Their package management
makes it often far more easy to install an OS package than
generate a Python package by hand (at least before "easy_install" and PyPI).

Approach: Install via the operating system package management
and then copy the files and directories over to the Python installation
you need them in. Of course, this requires that the OS Python
is similar enough to the target Python.

I do not know where the standard Python is installed under Windows.
But, the registry should tell you.
The relevant directory contains probably some
"\lib\python<version>\site-packages". ("\lib\python<version>" might be missing
unter Windows). There subdirectories containing "xml" are relevant
and need to be copied to the target Python installation.


Probably, there is an easier approach. I expect (but am not sure)
that the installer can be told via a parameter to use a secondary
Python installation. Look whether you can find installation instructions.
Or try typical ways to determine what parameters can be provided
to an executable ("<exe> /help", "<exe> /h", or similar).

Sudesh Soni

unread,
Nov 19, 2009, 9:40:34 PM11/19/09
to Dieter Maurer, xml...@python.org
Thanks Dieter. I will try this.
 
With regards
Sudesh


From: Dieter Maurer <die...@handshake.de>
To: Sudesh Soni <soni...@yahoo.com>
Cc: xml...@python.org
Sent: Thu, November 19, 2009 2:14:28 AM

Subject: Re: [XML-SIG] PyXML installation in Zope2.8.5
Reply all
Reply to author
Forward
0 new messages