ImportError: DLL load failed; Python 2.7; Windows 7

552 views
Skip to first unread message

csp

unread,
Jun 17, 2011, 1:26:28 PM6/17/11
to dadi-user
Hello,
I have the enthought python distribution installed on a PC running
Windows 7. I have encountered the following error message when trying
to import dadi (see paste from console window below). The other site
packages work fine. I also included the sys.path output in case that
is helpful.
Thanks in advance for any advice! I am new to dadi.


Python 2.7.1 |EPD 7.0-2 (64-bit)| (r271:86832, Dec 2 2010, 10:23:25)
[MSC v.150
0 64 bit (AMD64)]
Type "copyright", "credits" or "license" for more information.

IPython 0.10.1 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object'. ?object also works, ?? prints
more.

Welcome to pylab, a matplotlib-based Python environment.
For more information, type 'help(pylab)'.

In [1]: import dadi
---------------------------------------------------------------------------
ImportError Traceback (most recent call
last)

C:\Windows\system32\<ipython console> in <module>()

C:\EPD\lib\site-packages\dadi\__init__.py in <module>()
9 logging.basicConfig()
10
---> 11 import Demographics1D
12 import Demographics2D
13 import Inference

C:\EPD\lib\site-packages\dadi\Demographics1D.py in <module>()
4 import numpy
5
----> 6 from dadi import Numerics, PhiManip, Integration
7 from dadi.Spectrum_mod import Spectrum
8

C:\EPD\lib\site-packages\dadi\Integration.py in <module>()
19 from numpy import newaxis as nuax
20
---> 21 import Misc, Numerics, tridiag
22 import integration_c as int_c
23

ImportError: DLL load failed: %1 is not a valid Win32 application.

In [2]: import sys

In [3]: print sys.path
['', '', 'C:\\EPD\\python27.zip', 'C:\\EPD\\DLLs', 'C:\\EPD\\lib', 'C:\
\EPD\\lib
\\plat-win', 'C:\\EPD\\lib\\lib-tk', 'C:\\EPD', 'C:\\EPD\\lib\\site-
packages', '
C:\\EPD\\lib\\site-packages\\PIL', 'C:\\EPD\\lib\\site-packages\
\win32', 'C:\\EP
D\\lib\\site-packages\\win32\\lib', 'C:\\EPD\\lib\\site-packages\
\Pythonwin', 'C
:\\EPD\\lib\\site-packages\\IPython/Extensions', u'C:\\Users\\Caitlin
Pepperell\
\_ipython']

In [4]:

Gutenkunst, Ryan N - (rgutenk)

unread,
Jun 23, 2011, 1:56:12 PM6/23/11
to dadi...@googlegroups.com
Hello csp,

Thank you for including the error messages and sys.path. I suspect that
the problem is that we provide an installer for 32-bit python, and you're
running on 64-bit python.

The easiest solution is likely for you to build dadi yourself. Since your
Python shell indicates you installed the Enthought distribution, you
should have everything you need. To build and install your own version of
dadi:
1) Download and unzip the dadi source
2) In the top-level source-code directory, run 'python setup.py install'.
This will install dadi, including the C extensions that make dadi fast.

That should be it! Let me know how it goes.

Cheers,
Ryan
>--
>You received this message because you are subscribed to the Google Groups
>"dadi-user" group.
>To post to this group, send email to dadi...@googlegroups.com.
>To unsubscribe from this group, send email to
>dadi-user+...@googlegroups.com.
>For more options, visit this group at
>http://groups.google.com/group/dadi-user?hl=en.
>
>
>


--
Ryan Gutenkunst
Assistant Professor
Molecular and Cellular Biology
University of Arizona
phone: (520) 626-0569
http://gutengroup.mcb.arizona.edu




Reply all
Reply to author
Forward
0 new messages