Discussion:
[igraph] igraph Python: ImportError: DLL load failed
Sall, Kenneth B.
2008-02-11 20:43:41 UTC
Permalink
Hello,



I'm new to Python and igraph so sorry if this is a FAQ.



I installed Python 2.5.1 (Windows:
http://www.python.org/ftp/python/2.5.1/python-2.5.1.msi), rebooted, and
then installed "igraph" from the igraph-0.4.5.win32-py2.5.exe installer.



When I tried the test mentioned in one of the archived emails of this
list, I get this error:



Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit
(Intel)] on

win32

Type "help", "copyright", "credits" or "license" for more information.
from igraph.test import test
Traceback (most recent call last):

File "<stdin>", line 1, in <module>

File "C:\Python25\Lib\site-packages\igraph\__init__.py", line 29, in
<module>

from core import *

ImportError: DLL load failed: The specified module could not be found.



I also get a Windows alert message about libxml2.dll not found,
suggesting I reinstall to fix it. I tried that to no avail. Anyone know
what I'm missing?



Thanks in advance.



Kenneth B. Sall

XML Data and Systems Analyst
Advanced Concepts and Integrated Systems (ACIS)
Science Applications International Corp. (SAIC)
7125 Columbia Gateway Dr., Suite 250
Columbia, MD 21046
410-953-7016 (office)

410-300-2997 (mobile)
Tamas Nepusz
2008-02-12 09:31:36 UTC
Permalink
Hello,
Post by Sall, Kenneth B.
I also get a Windows alert message about libxml2.dll not found,
suggesting I reinstall to fix it. I tried that to no avail. Anyone
know what I’m missing?
Just a quick question: where is your libxml2.dll and libiconv.dll (or
simply iconv.dll) on your system?

In the meanwhile, I'll try to test installing igraph on a clean VMWare
Windows image when I get home and see what happens. Theoretically it's
enough to put libxml2.dll and libiconv.dll to anywhere where Windows
finds it (e.g. \Windows\System32).
--
T.
Gabor Csardi
2008-02-12 09:34:47 UTC
Permalink
Tamas, another quick question. Can't we simply include these dll's in
igraph? I see this is a waste of disk space, but probably not more
than a Mb, so it might worth it.

Gabor
Post by Sall, Kenneth B.
Hello,
Post by Sall, Kenneth B.
I also get a Windows alert message about libxml2.dll not found,
suggesting I reinstall to fix it. I tried that to no avail. Anyone
know what I’m missing?
Just a quick question: where is your libxml2.dll and libiconv.dll (or
simply iconv.dll) on your system?
In the meanwhile, I'll try to test installing igraph on a clean VMWare
Windows image when I get home and see what happens. Theoretically it's
enough to put libxml2.dll and libiconv.dll to anywhere where Windows
finds it (e.g. \Windows\System32).
--
T.
_______________________________________________
igraph-help mailing list
http://lists.nongnu.org/mailman/listinfo/igraph-help
--
Csardi Gabor <***@rmki.kfki.hu> UNIL DGM
Tamas Nepusz
2008-02-12 12:48:21 UTC
Permalink
Post by Gabor Csardi
Tamas, another quick question. Can't we simply include these dll's in
igraph? I see this is a waste of disk space, but probably not more
than a Mb, so it might worth it.
Theoretically that's possible by altering the setup.py script: we must
check the platform of the user and if it's Windows and we're building
the Windows installer, we must add libxml2.dll and iconv.dll to the
list of files to be installed. However, there are some minor flaws:

1. These DLLs get installed in the same directory where the files of
the package will be. (Python root\Lib\site-packages\igraph). This can
be considered an advantage or a disadvantage as well: clearly we're
wasting space, but we can be sure that the required libraries are
installed along with the package. Alternatively, we could try to infer
the full path of the system32 subdirectory somehow and install our
DLLs there, risking that we're overwriting a previous version of
libxml2.

2. The two DLLs are roughly 2 Mbytes, therefore effectively doubling
the size of the package.
--
T.
Gabor Csardi
2008-02-12 13:01:04 UTC
Permalink
On Tue, Feb 12, 2008 at 01:48:21PM +0100, Tamas Nepusz wrote:
[...]
Post by Tamas Nepusz
1. These DLLs get installed in the same directory where the files of
the package will be. (Python root\Lib\site-packages\igraph). This can
be considered an advantage or a disadvantage as well: clearly we're
wasting space, but we can be sure that the required libraries are
installed along with the package. Alternatively, we could try to infer
the full path of the system32 subdirectory somehow and install our
DLLs there, risking that we're overwriting a previous version of
libxml2.
Installing into a system directory is definitely not a good solution.
Post by Tamas Nepusz
2. The two DLLs are roughly 2 Mbytes, therefore effectively doubling
the size of the package.
That's probably too much. But, people who want to run igraph need to
install them anyway. In general i would be ready to sacrifice 2 Mb
of disk space waste in favour of easy installation. But the decision
is yours.

G.
--
Csardi Gabor <***@rmki.kfki.hu> UNIL DGM
Tamas Nepusz
2008-02-12 12:36:49 UTC
Permalink
Hi Kenneth,
Post by Sall, Kenneth B.
I also get a Windows alert message about libxml2.dll not found,
suggesting I reinstall to fix it. I tried that to no avail. Anyone
know what I’m missing?
I just checked the libxml2 archive on http://www.zlatkovic.com/pub/libxml/
. There is a file called libxml2.dll inside the bin subdirectory.
Please try copying this to c:\Windows\System32 (or wherever the
system32 subdirectory of your Windows setup is). Maybe you'll also
need to do that for iconv.dll in the iconv archive.

I also checked the compiled igraph extension with Dependency Walker (http://www.dependencywalker.com
). The main part of the compiled extension (core.pyd in my case)
depends solely on libxml2.dll, msvcr71.dll, python25.dll and
kernel32.dll. Provided that these files are installed properly at the
right places, Python should be able to import the igraph extension. If
it still does not work, please try to open core.pyd with Dependency
Walker and post any error messages that you encounter.
--
Tamas
Sall, Kenneth B.
2008-02-12 17:32:32 UTC
Permalink
Tamas wrote> I just checked the libxml2 archive on
http://www.zlatkovic.com/pub/libxml/ . There is a file called
libxml2.dll inside the bin subdirectory. Please try copying this to
c:\Windows\System32 (or wherever the system32 subdirectory of your
Windows setup is). Maybe you'll also need to do that for iconv.dll in
the iconv archive.





Thanks. Yes, I had obtained the zips from the zlatkovic.com link. I
moved both libxml2.dll (945 KB date 1/14/2008) and iconv.dll (868 KB,
dated 5/3/2006) to C:\WINDOWS\system32 and rebooted.



Now I get a Windows alert message about "zlib1.dll" missing. When I scan
my system, I find copies of zlib1.dll in various non-system areas such
as Aptana Jaxer/Apache22/bin and C:\Program Files\Oxygen XML Editor 8.2
and C:\Program Files\Intel\Wireless\Bin. Suggestions?





Kenneth B. Sall

XML Data and Systems Analyst
Advanced Concepts and Integrated Systems (ACIS)
Science Applications International Corp. (SAIC)
7125 Columbia Gateway Dr., Suite 250
Columbia, MD 21046
410-953-7016 (office)

410-300-2997 (mobile)
Tamas Nepusz
2008-02-12 18:38:20 UTC
Permalink
Now I get a Windows alert message about “zlib1.dll” missing. When I
scan my system, I find copies of zlib1.dll in various non-system
areas such as Aptana Jaxer/Apache22/bin and C:\Program Files\Oxygen
XML Editor 8.2 and C:\Program Files\Intel\Wireless\Bin. Suggestions?
You can also get a copy of zlib1.dll from http://www.zlatkovic.com/pub/libxml/
. Move that to system32 as well. (Strange though, I didn't know that
libxml2.dll also depends on zlib1.dll).
--
T.
Sall, Kenneth B.
2008-02-12 19:31:38 UTC
Permalink
Ah! That was the missing ingredient in the sauce! Tests run successfully
now.

Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit
(Intel)] on win32
Post by Sall, Kenneth B.
from igraph.test import test
test()
.....................................................
----------------------------------------------------------------------
Ran 53 tests in 0.171s
OK
------------
Thank you, Tamas!

Ken Sall
SAIC > ACIS > RDEC > Columbia
410-953-7016 (office)
410-300-2997 (mobile)

-----Original Message-----
From: Tamas Nepusz [mailto:***@gmail.com]
Sent: Tuesday, February 12, 2008 1:38 PM
To: Sall, Kenneth B.
Cc: igraph-***@nongnu.org
Subject: Re: [igraph] igraph Python: ImportError: DLL load failed
Post by Sall, Kenneth B.
Now I get a Windows alert message about "zlib1.dll" missing. When I
scan my system, I find copies of zlib1.dll in various non-system
areas such as Aptana Jaxer/Apache22/bin and C:\Program Files\Oxygen
XML Editor 8.2 and C:\Program Files\Intel\Wireless\Bin. Suggestions?
You can also get a copy of zlib1.dll from
http://www.zlatkovic.com/pub/libxml/
. Move that to system32 as well. (Strange though, I didn't know that
libxml2.dll also depends on zlib1.dll).
--
T.
Loading...