2 Feb 2011 11:36
Re: possible to check python version on import
Robert Bradshaw <robertwb <at> math.washington.edu>
2011-02-02 10:36:31 GMT
2011-02-02 10:36:31 GMT
On Mon, Jan 31, 2011 at 2:22 AM, Sebastian Haase <seb.haase <at> gmail.com> wrote: > Hi, > > I am trying to do my first steps with cython. > By accident I compiled with python2.6 while I'm otherwise using Python 2.5. > So the error I got was: > >>>> primes.primes(4) > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > File "primes.pyx", line 3, in primes.primes (primes.c:443) > def primes(int kmax): > TypeError: __int__ returned non-int (type int) > > > Is there any way to check python versions of a module - at least to > give a warning... ? That's a good idea, can anyone think of a reason this should not be done? http://trac.cython.org/cython_trac/ticket/657 > shaase <at> iris:~/qq/cython: cd Demos/ > shaase <at> iris:~/qq/cython/Demos: python setup.py build_ext --inplace > Compiling primes.pyx because it changed. > Compiling spam.pyx because it changed. > Compiling numpy_demo.pyx because it changed. > running build_ext > building 'primes' extension > C compiler: gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2(Continue reading)
RSS Feed