[SciPy-user] ImportError: No module named win32pdh
Robert Kern
robert.kern at gmail.com
Mon Mar 20 01:45:32 EST 2006
Marjan Grah wrote:
> Dear all,
>
> I have some "strange" error. I installed the numpy 0.9.6 (from the file:
> numpy-0.9.6.win32-py2.4.exe; in the file
> c:\Python24\Lib\site-packages\numpy\version.py the first line is
> version='0.9.6')
> scipy version 0.4.8 (from the file:
> scipy-0.4.8.win32-py2.4-pentium4sse2.exe; in the file
> c:\Python24\Lib\site-packages\scipy\__svn_version__.py I have: version =
> '1738') and when I wish to
> import scipy I got this error:
>
> >>> from scipy import *
>
> Traceback (most recent call last):
> File "<pyshell#13>", line 1, in -toplevel-
> from scipy import *
> File "C:\Python24\Lib\site-packages\scipy\lib\__init__.py", line 4, in
> -toplevel-
> from numpy.testing import ScipyTest
> File "C:\Python24\Lib\site-packages\numpy\testing\__init__.py", line
> 3, in -toplevel-
> from numpytest import *
> File "C:\Python24\Lib\site-packages\numpy\testing\numpytest.py", line
> 18, in -toplevel-
> from utils import jiffies
> File "C:\Python24\Lib\site-packages\numpy\testing\utils.py", line 69,
> in -toplevel-
> import win32pdh
> ImportError: No module named win32pdh
>
> For the python I have installed this version:
> >>> import sys
> >>> sys.version
> '2.4.2 (#67, Sep 28 2005, 12:41:11) [MSC v.1310 32 bit (Intel)]'
>
> my operatting system is Windows XP with service pack 2. The computer is
> not Intel Pentium but an AMD Opteron 148.
> Before this instalation I use Numpy version 0.94 and scipy 0.4.6 and
> everything work. Could somebody help me?
This is a known issue. A dependency on the win32all package (which provides
win32pdh) snuck in. We will be removing it in the next release.
In the meantime, you can either install win32all (which I do recommend; it's
widely considered an essential package for Windows users):
http://starship.python.net/~skippy/win32/
Or you can change numpy/testing/utils.py on line 67 or thereabouts. Change the
line that looks like this (or something like it):
if os.name=='nt' and sys.version[:3] > '2.3':
to this:
if False:
--
Robert Kern
robert.kern at gmail.com
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco
More information about the SciPy-User
mailing list