On Mon, Dec 28, 2009 at 2:30 PM, Gökhan Sever <gokhanse...@gmail.com> wrote:
> > > On Mon, Dec 28, 2009 at 12:15 PM, Gökhan Sever <gokhanse...@gmail.com>wrote: > >> >> >> On Mon, Dec 28, 2009 at 11:16 AM, Gökhan Sever <gokhanse...@gmail.com>wrote: >> >>> >>> >>> On Mon, Dec 28, 2009 at 11:07 AM, Robert Kern <robert.k...@gmail.com>wrote: >>> >>>> On Mon, Dec 28, 2009 at 11:00, Gökhan Sever <gokhanse...@gmail.com> >>>> wrote: >>>> >>>> > One interesting thing I have noticed while installing the numpy from >>>> the >>>> > source is that numpy dependent libraries must be re-installed and this >>>> must >>>> > be a clean re-install. For instance I can't import some matplotlib and >>>> scipy >>>> > modules without making a fresh installation for these packages. My >>>> attempts >>>> > result with a runtime error. >>>> >>>> Please, please, always copy-and-paste the traceback when reporting an >>>> error. I know you aren't formally reporting a bug here, but it always >>>> helps. >>>> >>>> > Could someone clarify this point? Is this due >>>> > to API change in the numpy core? >>>> >>>> Cython/Pyrex code does a runtime check on the struct sizes of types. >>>> We have carefully added a member to the PyArrayDescr struct; i.e. it >>>> shouldn't cause any actual problems, but Cython does the check >>>> anyways. This affects a few modules in scipy, but shouldn't have >>>> affected anything in matplotlib. The traceback may help us identify >>>> the issue you are seeing. >>>> >>>> >>> It is too late for the tracebacks. I have already removed the problematic >>> packages and did clean installs. However, next time I will be more careful >>> while reporting such issues. If it helps, in both matplotlib (via ipython >>> -pylab) and scipy.stats import cases the runtime errors was raised due to >>> numpy.core.multiarray module import. >>> >>> >>> >>>> -- >>>> >>>> Robert Kern >>>> >>>> "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 >>>> _______________________________________________ >>>> NumPy-Discussion mailing list >>>> NumPy-Discussion@scipy.org >>>> http://mail.scipy.org/mailman/listinfo/numpy-discussion >>>> >>> >>> >>> >>> -- >>> Gökhan >>> >> >> Here is another interesting point to consider. To reproduce the runtime >> error I mentioned previously I downgraded numpy (from the latest check-out >> installation) following these steps: >> >> svn co http://svn.scipy.org/svn/numpy/branches/1.3.x/ numpy >> cd numpy >> python setup.py install >> Writing >> /usr/lib/python2.6/site-packages/numpy-1.3.1.dev8031-py2.6.egg-info >> >> I[2]: import matplotlib.pyplot as plt >> Segmentation fault >> >> I[3]: from scipy import stats >> Segmentation fault >> >> I have installed matplotlib and scipy using the latest numpy dev version. >> A little later I will downgrade matplotlib and scipy to their previous >> stable versions, and compile them using numpy 1.3.x. Afterwards I will >> update numpy and test to see if I can re-produce the runtime error to >> provide the tracebacks. First let me know if any tracebacks needed for these >> segfaults or are these known failures? >> >> >> ================================================================================ >> Platform : >> Linux-2.6.29.6-217.2.3.fc11.i686.PAE-i686-with-fedora-11-Leonidas >> Python : ('CPython', 'tags/r26', '66714') >> >> ================================================================================ >> >> >> -- >> Gökhan >> > > > Since no one has replied, I tried to reproduce the runtime error but ended > up with different errors. Read more for the details: > > svn co http://svn.scipy.org/svn/scipy/tags/0.7.1/ scipy > python setup.py install > Writing /usr/lib/python2.6/site-packages/scipy-0.7.1-py2.6.egg-info > > svn co > https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/tags/v0_99_0/matplotlib > python setup.py install > Writing /usr/lib/python2.6/site-packages/matplotlib-0.99.0-py2.6.egg-info > > install them using > > >>> import numpy > >>> numpy.__version__ > '1.3.1.dev8031' > > scipy import is fine but matplotlib fails with a different import error. I > wonder if the buildbots test the source and releases for against different > numpy versions or it is just might system acting weird. > > >>> from scipy import stats > > > >>> import matplotlib.pyplot as plt > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > File > "/home/gsever/Desktop/python-repo/matplotlib/lib/matplotlib/pyplot.py", line > 6, in <module> > from matplotlib.figure import Figure, figaspect > File > "/home/gsever/Desktop/python-repo/matplotlib/lib/matplotlib/figure.py", line > 17, in <module> > import artist > File > "/home/gsever/Desktop/python-repo/matplotlib/lib/matplotlib/artist.py", line > 5, in <module> > from transforms import Bbox, IdentityTransform, TransformedBbox, > TransformedPath > File > "/home/gsever/Desktop/python-repo/matplotlib/lib/matplotlib/transforms.py", > line 34, in <module> > from matplotlib._path import affine_transform > ImportError: No module named _path > > Anyways, back to the main point. First remove the numpy 1.3.x: > > [r...@ccn site-packages]# rm -rf numpy > [r...@ccn site-packages]# rm -rf numpy-1.3.1.dev8031-py2.6.egg-info > > and install from the latest trunk: > > svn co http://svn.scipy.org/svn/numpy/trunk numpy > python setup.py install > Writing /usr/lib/python2.6/site-packages/numpy-1.5.0.dev8032-py2.6.egg-info > > This time scipy asserts: > > >>> from scipy import stats > > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > File "/usr/lib/python2.6/site-packages/scipy/stats/__init__.py", line 7, > in <module> > from stats import * > File "/usr/lib/python2.6/site-packages/scipy/stats/stats.py", line 203, > in <module> > from morestats import find_repeats #is only reference to scipy.stats > File "/usr/lib/python2.6/site-packages/scipy/stats/morestats.py", line 7, > in <module> > import distributions > File "/usr/lib/python2.6/site-packages/scipy/stats/distributions.py", > line 27, in <module> > import vonmises_cython > File "numpy.pxd", line 30, in scipy.stats.vonmises_cython > (scipy/stats/vonmises_cython.c:2939) > ValueError: numpy.dtype does not appear to be the correct type object > > That is the cython problem. I think they fixed it, but I don't know if that is in the recent release. Chuck
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion