[Tutor] Finding the version # of a module, and py module problem

MRAB python at mrabarnett.plus.com
Fri Aug 6 03:23:51 CEST 2010


W. eWatson wrote:
> It's been awhile since I've used python, and I recall there is a way to 
> find the version number from the IDLE command line  prompt. dir, help, 
> __version.__?
> 
> I made the most minimal change to a program, and it works for me, but 
> not my partner. He gets
> 
> Traceback (most recent call last):
>   File "C:\Documents and 
> Settings\HP_Administrator.DavesDesktop\Desktop\NC-FireballReport20100729.py", 
> line 40, in <module>
>     from scipy import stats as stats # scoreatpercentile
>   File "C:\Python25\lib\site-packages\scipy\stats\__init__.py", line 7, 
> in <module>
>     from stats import *
>   File "C:\Python25\lib\site-packages\scipy\stats\stats.py", line 191, 
> in <module>
>     import scipy.special as special
>   File "C:\Python25\lib\site-packages\scipy\special\__init__.py", line 
> 22, in <module>
>     from numpy.testing import NumpyTest
> ImportError: cannot import name NumpyTest
> 
> Here are the first few lines of code.
> 
>     import sys, os, glob
>     import string
>     from numpy import *
>     from datetime import datetime, timedelta
>     import time
>     from scipy import stats as stats # scoreatpercentile
> 
> I'm pretty sure he has the same version of Python, 2.5, but perhaps not 
> the numpy or scipy modules. I need to find out his version numbers.
> 
Try:

     import numpy
     help(numpy.version)

BTW, on Python 2.6 I can see that there's "numpytest" but not
"NumpyTest".



More information about the Python-list mailing list