Sign up now! · Forgot password?
RSS/Atom feed identi.ca Twitter

No module named libxml2

This discussion is connected to the gimp-docs-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

11 of 11 messages available
Toggle history

Please log in to manage your subscriptions.

No module named libxml2 Kolbjørn Stuestøl 15 Sep 16:26
  No module named libxml2 Ulf-D. Ehlert 15 Sep 18:27
   No module named libxml2 Kolbjørn Stuestøl 15 Sep 21:25
    No module named libxml2 Kolbjørn Stuestøl 20 Sep 20:48
     No module named libxml2 Ulf-D. Ehlert 21 Sep 19:03
      No module named libxml2 Kolbjørn Stuestøl 22 Sep 15:35
       No module named libxml2 Kolbjørn Stuestøl 22 Sep 15:43
        No module named libxml2 Ulf-D. Ehlert 26 Sep 18:18
       No module named libxml2 Ulf-D. Ehlert 26 Sep 18:15
        No module named libxml2 Kolbjørn Stuestøl 26 Sep 19:39
         No module named libxml2 Ulf-D. Ehlert 04 Oct 18:54
Kolbjørn Stuestøl
2012-09-15 16:26:42 UTC (about 2 years ago)

No module named libxml2

Moving my work on GIMP to another computer I run into some problems.

Example: make validate-nn
Result:
[XML] xml/nn/filters/alpha-to-logo.xml Traceback (most recent call last):
File ".tools/xml2po.py", line 191, in main
File ".tools/xml2po.py", line 88, in Main from xml2po import Main
File "/bin/GIMP/gimp-help-2/tools/xml2po/__init__.py", line 27, in

import libxml2 ImportError: No module named libxml2

Running python 2.6. I do not know about programming in Python. I do have a libxml2/libxml directory installed ( in usr/include/libxml2) but no separate files with this name. Question: Where is __init__.py looking for includes? How to fix this?
Other fixes needed?

Neither does make check-images-nn works as suggested, but I think this is another question.
I am running Cygwin on Windows 7.

By now I am running Cygwin on another computer, and it works. I know that I could copy the complete Cygwin directory from this computer, but choosed to install from scratch to learn a bit about how to do it.

Some years ago there was a thread in this forum about installing the programs needed for translating GIMP Help, also on Cygwin, but alas I am not able to find it.

Kolbjoern Stuestoel

Ulf-D. Ehlert
2012-09-15 18:27:04 UTC (about 2 years ago)

No module named libxml2

On Sat, Sep 15, 2012 at 06:26:42PM +0200, Kolbj�rn Stuest�l wrote:

Moving my work on GIMP to another computer I run into some problems.

Example: make validate-nn
Result:
[XML] xml/nn/filters/alpha-to-logo.xml Traceback (most recent call last):
File ".tools/xml2po.py", line 191, in main
File ".tools/xml2po.py", line 88, in Main from xml2po import Main
File "/bin/GIMP/gimp-help-2/tools/xml2po/__init__.py", line 27, in
import libxml2
ImportError: No module named libxml2

Running python 2.6. I do not know about programming in Python. I do have a libxml2/libxml directory installed ( in usr/include/libxml2) but no separate files with this name. Question: Where is __init__.py looking for includes?

Usually Python is looking for
/usr/lib*/python*/site-packages/libxml2.py (try python -c "import sysconfig; print sysconfig.get_path('sitelib')").

How to fix this?

Install package "libxml2-python" (or similar, I don't know Cygwin).

Other fixes needed?

Neither does make check-images-nn works as suggested, but I think this is another question.

Error messages?

I am running Cygwin on Windows 7.

This ("Windows") *is* a bug... ;-)

Ulf

Kolbjørn Stuestøl
2012-09-15 21:25:56 UTC (about 2 years ago)

No module named libxml2

Den 15.09.2012 20:27, skreiv Ulf-D. Ehlert:

On Sat, Sep 15, 2012 at 06:26:42PM +0200, Kolbj�rn Stuest�l wrote:

Moving my work on GIMP to another computer I run into some problems.

Example: make validate-nn
Result:
[XML] xml/nn/filters/alpha-to-logo.xml Traceback (most recent call last):
File ".tools/xml2po.py", line 191, in main
File ".tools/xml2po.py", line 88, in Main from xml2po import Main
File "/bin/GIMP/gimp-help-2/tools/xml2po/__init__.py", line 27, in
import libxml2
ImportError: No module named libxml2

Running python 2.6. I do not know about programming in Python. I do have a libxml2/libxml directory installed ( in usr/include/libxml2) but no separate files with this name. Question: Where is __init__.py looking for includes?

Usually Python is looking for
/usr/lib*/python*/site-packages/libxml2.py (try python -c "import sysconfig; print sysconfig.get_path('sitelib')").

The prog. did not found sysconfig

How to fix this?

Install package "libxml2-python" (or similar, I don't know Cygwin).

Did it, but same error message.

Other fixes needed?

Neither does make check-images-nn works as suggested, but I think this is another question.

Error messages?

I deleted all Cygwin installations to clean it up and to give it a new try. Do not remember the messages. Will be back as soon as I finished reinstalling. I.e. next week. Some other things to do this weekend.

I am running Cygwin on Windows 7.

This ("Windows") *is* a bug... ;-)

Well, I really do not disagree, but I had to use DOS and later Windows because of my job.
Kolbjoern

Ulf

Kolbjørn Stuestøl
2012-09-20 20:48:38 UTC (about 2 years ago)

No module named libxml2

Error mesages in check-images-xx
Error message in check_image_resolutions.sh

Den 15.09.2012 23:25, skreiv Kolbjørn Stuestøl:

Den 15.09.2012 20:27, skreiv Ulf-D. Ehlert:

On Sat, Sep 15, 2012 at 06:26:42PM +0200, Kolbjørn Stuestøl wrote:

...

Neither does make check-images-nn works as suggested, but I think this is another question.
Error messages?

After listing the orphaned images in English and Norwegian (the list looks normal to me) the following message occurred: /bin/sh: line 8: 2084 Aborted python tools/validate_references.py --verbose --broken --orphaned --imgdir=images/C,images/nn Makefile: 1611: recipe for target 'check-image-references' failed make[1]: *** [check-image-references] Error 134 Makefile:1622: recipe for target 'check-images-nn' failed make: *** [check-images-nn] Error 2

As far as I have tested them, the other programs like make xxxx and git xxxx works as I expects.
Kolbjoern

...

Ulf

Ulf-D. Ehlert
2012-09-21 19:03:51 UTC (about 2 years ago)

No module named libxml2

On Thu, Sep 20, 2012 at 10:48:38PM +0200, Kolbjrn Stuestl wrote:

Den 15.09.2012 23:25, skreiv Kolbjrn Stuestl:

Den 15.09.2012 20:27, skreiv Ulf-D. Ehlert:

On Sat, Sep 15, 2012 at 06:26:42PM +0200, Kolbjrn Stuestl wrote:

...

Neither does make check-images-nn works as suggested, but I think this is another question.
Error messages?

After listing the orphaned images in English and Norwegian (the list looks normal to me) the following message occurred: /bin/sh: line 8: 2084 Aborted python tools/validate_references.py --verbose --broken --orphaned --imgdir=images/C,images/nn
Makefile: 1611: recipe for target 'check-image-references' failed make[1]: *** [check-image-references] Error 134 Makefile:1622: recipe for target 'check-images-nn' failed make: *** [check-images-nn] Error 2

Yet another strange Cygwin problem? It works fine for me (tested "de" and "nn").

Do you still get the error message if you call the script directly:

python tools/validate_references.py -vob -i images/C,images/nn

Ulf

Gott ist der einzige Herr der Welt, der weniger zu sagen hat
als seine Diener.
		-- Karlheinz Deschner
_______________________________________________
gimp-docs-list mailing list
gimp-docs-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gimp-docs-list
Kolbjørn Stuestøl
2012-09-22 15:35:44 UTC (about 2 years ago)

No module named libxml2

Den 21.09.2012 21:03, skreiv Ulf-D. Ehlert:

On Thu, Sep 20, 2012 at 10:48:38PM +0200, Kolbjrn Stuestl wrote:

Den 15.09.2012 23:25, skreiv Kolbjrn Stuestl:

Den 15.09.2012 20:27, skreiv Ulf-D. Ehlert:

On Sat, Sep 15, 2012 at 06:26:42PM +0200, Kolbjrn Stuestl wrote:

...

Neither does make check-images-nn works as suggested, but I think this is another question.
Error messages?

After listing the orphaned images in English and Norwegian (the list looks normal to me) the following message occurred: /bin/sh: line 8: 2084 Aborted python tools/validate_references.py --verbose --broken --orphaned --imgdir=images/C,images/nn
Makefile: 1611: recipe for target 'check-image-references' failed make[1]: *** [check-image-references] Error 134 Makefile:1622: recipe for target 'check-images-nn' failed make: *** [check-images-nn] Error 2

Yet another strange Cygwin problem? It works fine for me (tested "de" and "nn").

Do you still get the error message if you call the script directly:

python tools/validate_references.py -vob -i images/C,images/nn

Ulf

The program acted as before, i.e. listed the 19 orphaned images, and then output: Aborted. No further messages. So, it looks like it is doing what it is intended to do. :-) I do not know about programming in Python, but it looks like being similar to many other programming languages so perhaps I have a closer look at it some day.

I reinstalled Cygwin for the third time and now make html-xx does not work: *** Making html for nn ...
I/O error : Attempt to load network entity http://www.docbook.org/xml/4.3/docbookx.dtd xml/nn/gimp.xml:2: warning: failed to load external entity "http://www.docbook.org/xml/4.3/docbookx.dtd" //OASIS//DTD DocBook XML V4.3//EN"
"http://www.docbook.org/xml/4.3/docbookx.dtd"

So still something to do. This was discussed in this forum some years back but I am not able to find it. As I remember gimp-help is using Docbook 4.5. I also have to figure out how to set the pointer to a local file.

Kolbjoern

gimp-docs-list mailing list
gimp-docs-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gimp-docs-list
Kolbjørn Stuestøl
2012-09-22 15:43:48 UTC (about 2 years ago)

No module named libxml2

Den 22.09.2012 17:35, skreiv Kolbjrn Stuestl:

Den 21.09.2012 21:03, skreiv Ulf-D. Ehlert:

On Thu, Sep 20, 2012 at 10:48:38PM +0200, Kolbjrn Stuestl wrote:

Den 15.09.2012 23:25, skreiv Kolbjrn Stuestl:

I reinstalled Cygwin for the third time and now make html-xx does not work:
*** Making html for nn ...
I/O error : Attempt to load network entity http://www.docbook.org/xml/4.3/docbookx.dtd xml/nn/gimp.xml:2: warning: failed to load external entity "http://www.docbook.org/xml/4.3/docbookx.dtd" //OASIS//DTD DocBook XML V4.3//EN"
"http://www.docbook.org/xml/4.3/docbookx.dtd"

So still something to do. This was discussed in this forum some years back but I am not able to find it. As I remember gimp-help is using Docbook 4.5. I also have to figure out how to set the pointer to a local file.

Kolbjoern

Solution: Installed Docbook 4.3. Now make html-xx works Perhaps it is not necessary to use the Docbook 4.5 version?

Kolbjoern

gimp-docs-list mailing list
gimp-docs-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gimp-docs-list
Ulf-D. Ehlert
2012-09-26 18:15:31 UTC (about 2 years ago)

No module named libxml2

On Sat, Sep 22, 2012 at 05:35:44PM +0200, Kolbj�rn Stuest�l wrote:

The program acted as before, i.e. listed the 19 orphaned images, and then output: Aborted. No further messages. So, it looks like it is doing what it is intended to do. :-)

Yes, but I can't see any reason why it should abort.

I do not know about programming in Python, but it looks like being similar to many other programming languages so perhaps I have a closer look at it some day.

You could start with
python [-v] tools/validate_references.py --help or even
python -c 'import sys; sys.exit(0)' to check if even a simple python script aborts.

Good luck ;-) Ulf

Ulf-D. Ehlert
2012-09-26 18:18:15 UTC (about 2 years ago)

No module named libxml2

On Sat, Sep 22, 2012 at 05:43:48PM +0200, Kolbj�rn Stuest�l wrote: [...]

Solution: Installed Docbook 4.3. Now make html-xx works Perhaps it is not necessary to use the Docbook 4.5 version?

IMHO we should just switch to DocBook 4.5. It was released 6 years ago...

Ulf

Kolbjørn Stuestøl
2012-09-26 19:39:11 UTC (about 2 years ago)

No module named libxml2

Den 26.09.2012 20:15, skreiv Ulf-D. Ehlert:

On Sat, Sep 22, 2012 at 05:35:44PM +0200, Kolbjørn Stuestøl wrote:

The program acted as before, i.e. listed the 19 orphaned images, and then output: Aborted. No further messages. So, it looks like it is doing what it is intended to do. :-)

Yes, but I can't see any reason why it should abort.

I do not know about programming in Python, but it looks like being similar to many other programming languages so perhaps I have a closer look at it some day.

You could start with
python [-v] tools/validate_references.py --help or even
python -c 'import sys; sys.exit(0)' to check if even a simple python script aborts.

Good luck ;-) Ulf

Tried all command options mentioned in the --help listing (not the -h listing).
All returned something + "Aborted".

The only one that not was aborted was python tools/validate_references.py --help

I had to put the option *after* the command: python tools/validate_references.py -o Writing python -o tools/validate_references.py

resulted in error message "Unknown option: -o"

python -c 'import sys; sys.exit(0)' returned nothing.

Is there any way to step through the Python script or to get a log that register every step of the script? Or do I have to add some print's to the script to follow the steps?

I have not tried other pyhon scripts. Programming has to wait. At the moment I am writing on the gimp-help-2 (Brush) Dynamics.

Kolbjoern

Ulf-D. Ehlert
2012-10-04 18:54:43 UTC (about 2 years ago)

No module named libxml2

On Wed, Sep 26, 2012 at 09:39:11PM +0200, Kolbjrn Stuestl wrote:

Tried all command options mentioned in the --help listing (not the -h listing).
All returned something + "Aborted".

The only one that not was aborted was python tools/validate_references.py --help

I had to put the option *after* the command: python tools/validate_references.py -o Writing python -o tools/validate_references.py

resulted in error message "Unknown option: -o"

Yes, '-o' is a script option, but '-v' is a valid Python option too.

python -c 'import sys; sys.exit(0)' returned nothing.

Is there any way to step through the Python script

You can try pdb (http://docs.python.org/library/pdb.html):

python -m pdb tools/validate_references.py ...

but that's overkill.

or to get a log that register every step of the script?

There's a trace module (http://docs.python.org/library/trace.html), but this would probably print much more information than you want.

Or do I have to add some print's to the script to follow the steps?

This is the easiest way - or maybe it's even better to remove (or disable) statements to find the problem. Start with removing the two "sys.stdout.flush()" statements...

Ulf

Jeder Staat beruht auf Macht, jede Macht auf Gewalt, und
Gewalt, sagt Einstein, zieht stets moralisch Minderwertige an.
		-- Karlheinz Deschner
_______________________________________________
gimp-docs-list mailing list
gimp-docs-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gimp-docs-list