Opened 11 years ago

Closed 11 years ago

#385 closed enhancement (wontfix)

Cannot use libxml2

Reported by: GG1234 Owned by: osgeo4w-dev@…
Priority: minor Component: Package
Version: Keywords:
Cc:

Description (last modified by maphew)

Hello all,

Trying to use libxml2 in some python code, I run into this error message : ImportError: No module named libxml2

I thought it was in my PATH settings, but it seems to have all it needs (see below).

Any hints ?

Thanks a lot,

GG.

SET GDAL_DATA=C:\OSGeo4W\share\epsg_csv
SET GISBASE=C:\OSGeo4W\apps\grass\grass-6.4.3
SET GISRC=C:\DATA\GRASS
SET GRASS_SH=C:\OSGeo4W\apps\msys\bin\sh.exe
SET LD_LIBRARY_PATH=C:\OSGeo4W\apps\grass\grass-6.4.3\lib
SET PYTHONHOME=C:\OSGeo4W\apps\python27
SET PYTHONLIB=C:\OSGeo4W\apps\python27;
SET QGIS_DEBUG=1
chcp 65001
SET GDAL_DATA=C:\OSGeo4W\share\gdal
SET GDAL_DRIVER_PATH=C:\OSGeo4W\bin\gdalplugins\

[editor's note: forced line-wrap for legibility]

SET Path=C:\OSGeo4W\bin;^
C:\OSGeo4W\lib;^
C:\OSGeo4W\apps\python27\Scripts;^
C:\OSGeo4W\apps\python27\lib\site-packages\PyQt4;^
C:\OSGeo4W\apps\qgis;^
C:\OSGeo4W\apps\qgis\bin;^
C:\OSGeo4W\apps\grass\grass-6.4.3\scripts;^
C:\OSGeo4W\apps\grass\grass-6.4.3\etc;^
C:\OSGeo4W\apps\grass\grass-6.4.3\etc\python;^
C:\OSGeo4W\apps\grass\grass-6.4.3\lib;^
C:\OSGeo4W\apps\grass\grass-6.4.3\bin;^
C:\OSGeo4W\apps\msys\bin;%PATH%

SET PYTHONPATH=C:\OSGeo4W\apps\qgis\python\Lib;^
C:\OSGeo4W\apps\qgis\python;^
C:\OSGeo4W\bin;C:\OSGeo4W\apps\grass\grass-6.4.3\etc\python

Change History (2)

comment:1 by maphew, 11 years ago

Description: modified (diff)

Sorry, the libxml2 package installed with osgeo4w isn't a python package.

There is an old ticket, #226, which indicates there might be possible collisions with installing python lxml in addition to the binary libxml2 package we have now, but so far as I know no one has tested to see if that's true.

I did try installing python lxml via pip (ExternalPythonPackages, pip install lxml) but that failed with "make sure the development packages of libxml2 and libxslt are installed". This means it's trying to build from source instead of grabbing the binary version.

Going direct to the latest egg binary for 2.7 with pip install %url_to_egg% also failed, but this time for a lcoal reason, "IOError: [Errno 2] No such file or directory: 'd:
temp
systmp
pip-el8cr5-build
setup.py'"

The next thing to try would be using a standard Windows Installer, see #114. I've run out of time to dig into this personally.

Sources:

comment:2 by GG1234, 11 years ago

Resolution: wontfix
Status: newclosed
Type: defectenhancement

Hi maphew,

I have setup lxml with the pypi distribute-0.6.49 python setup file and it works without bugs since now.

I will close the ticket as resolved/wontfix and also add my solution to ticket 226.

Thanks for the help and all my whishes for 2014 !

Cev.

Note: See TracTickets for help on using tickets.