scipy error compiling csr_wrap under Python 2.7
Hi, I failed to get the scipy 0.8 rc1 and SVN to build under Python2.7 with numpy '2.0.0.dev8469' and gcc version 4.4.4 20100503 (Red Hat 4.4.4-2) (GCC) . But scipy does compile with Python 2.6. building 'scipy.sparse.sparsetools._csr' extension compiling C++ sources C compiler: g++ -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -fPIC compile options: '-I/usr/local/lib/python2.7/site-packages/numpy/core/include -I/usr/local/include/python2.7 -c' g++: scipy/sparse/sparsetools/csr_wrap.cxx scipy/sparse/sparsetools/csr_wrap.cxx: In function ‘int require_size(PyArrayObject*, npy_intp*, int)’: scipy/sparse/sparsetools/csr_wrap.cxx:2910: error: expected ‘)’ before ‘PRIdPTR’ scipy/sparse/sparsetools/csr_wrap.cxx:2910: warning: spurious trailing ‘%’ in format scipy/sparse/sparsetools/csr_wrap.cxx:2910: warning: too many arguments for format scipy/sparse/sparsetools/csr_wrap.cxx:2917: error: expected ‘)’ before ‘PRIdPTR’ scipy/sparse/sparsetools/csr_wrap.cxx:2917: warning: spurious trailing ‘%’ in format scipy/sparse/sparsetools/csr_wrap.cxx:2917: warning: too many arguments for format scipy/sparse/sparsetools/csr_wrap.cxx: In function ‘int require_size(PyArrayObject*, npy_intp*, int)’: scipy/sparse/sparsetools/csr_wrap.cxx:2910: error: expected ‘)’ before ‘PRIdPTR’ scipy/sparse/sparsetools/csr_wrap.cxx:2910: warning: spurious trailing ‘%’ in format scipy/sparse/sparsetools/csr_wrap.cxx:2910: warning: too many arguments for format scipy/sparse/sparsetools/csr_wrap.cxx:2917: error: expected ‘)’ before ‘PRIdPTR’ scipy/sparse/sparsetools/csr_wrap.cxx:2917: warning: spurious trailing ‘%’ in format scipy/sparse/sparsetools/csr_wrap.cxx:2917: warning: too many arguments for format error: Command "g++ -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/local/lib/python2.7/site-packages/numpy/core/include -I/usr/local/include/python2.7 -c scipy/sparse/sparsetools/csr_wrap.cxx -o build/temp.linux-x86_64-2.7/scipy/sparse/sparsetools/csr_wrap.o" failed with exit status 1 The error is possibly related the variable 'NPY_INTP_FMT' (defined in numpy/core/include/numpy/ndarraytypes.h). A grep shows these files: scipy/sparse/sparsetools/coo_wrap.cxx: sprintf(s,"%" NPY_INTP_FMT ",", size[i]); scipy/sparse/sparsetools/coo_wrap.cxx: sprintf(s,"%" NPY_INTP_FMT ",", array_size(ary,i)); scipy/sparse/sparsetools/bsr_wrap.cxx: sprintf(s,"%" NPY_INTP_FMT ",", size[i]); scipy/sparse/sparsetools/bsr_wrap.cxx: sprintf(s,"%" NPY_INTP_FMT ",", array_size(ary,i)); scipy/sparse/sparsetools/numpy.i: sprintf(s,"%" NPY_INTP_FMT ",", size[i]); scipy/sparse/sparsetools/numpy.i: sprintf(s,"%" NPY_INTP_FMT ",", array_size(ary,i)); scipy/sparse/sparsetools/csr_wrap.cxx: sprintf(s,"%" NPY_INTP_FMT ",", size[i]); scipy/sparse/sparsetools/csr_wrap.cxx: sprintf(s,"%" NPY_INTP_FMT ",", array_size(ary,i)); scipy/sparse/sparsetools/csc_wrap.cxx: sprintf(s,"%" NPY_INTP_FMT ",", size[i]); scipy/sparse/sparsetools/csc_wrap.cxx: sprintf(s,"%" NPY_INTP_FMT ",", array_size(ary,i)); scipy/sparse/sparsetools/dia_wrap.cxx: sprintf(s,"%" NPY_INTP_FMT ",", size[i]); scipy/sparse/sparsetools/dia_wrap.cxx: sprintf(s,"%" NPY_INTP_FMT ",", array_size(ary,i)); Note that the scipy/sparse/sparsetools/numpy.i contains tabs in some places instead of spaces. The ndarraytypes.h is present in /usr/local/lib/python2.7/site-packages/numpy/core/include/numpy/ Bruce
Hi, I failed to get the scipy 0.8 rc1 and SVN to build under Python2.7 with numpy '2.0.0.dev8469' and gcc version 4.4.4 20100503 (Red Hat 4.4.4-2) (GCC) . But scipy does compile with Python 2.6.
If this is easy to fix on linux (and someone comes up with that fix) it makes sense to do so. On OS X the problems are more serious and it looks
On Wed, Jul 7, 2010 at 5:27 AM, Bruce Southey <bsouthey@gmail.com> wrote: like they require changes to numpy.distutils first, so it's not going to work with numpy 1.4.1 in any case. So full support for 2.7 on all platforms is not going to happen for the 0.8.0 release. This is http://projects.scipy.org/scipy/ticket/1180 by the way. Ralf building 'scipy.sparse.sparsetools._csr' extension
compiling C++ sources C compiler: g++ -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -fPIC
compile options: '-I/usr/local/lib/python2.7/site-packages/numpy/core/include -I/usr/local/include/python2.7 -c' g++: scipy/sparse/sparsetools/csr_wrap.cxx scipy/sparse/sparsetools/csr_wrap.cxx: In function ‘int require_size(PyArrayObject*, npy_intp*, int)’: scipy/sparse/sparsetools/csr_wrap.cxx:2910: error: expected ‘)’ before ‘PRIdPTR’ scipy/sparse/sparsetools/csr_wrap.cxx:2910: warning: spurious trailing ‘%’ in format scipy/sparse/sparsetools/csr_wrap.cxx:2910: warning: too many arguments for format scipy/sparse/sparsetools/csr_wrap.cxx:2917: error: expected ‘)’ before ‘PRIdPTR’ scipy/sparse/sparsetools/csr_wrap.cxx:2917: warning: spurious trailing ‘%’ in format scipy/sparse/sparsetools/csr_wrap.cxx:2917: warning: too many arguments for format scipy/sparse/sparsetools/csr_wrap.cxx: In function ‘int require_size(PyArrayObject*, npy_intp*, int)’: scipy/sparse/sparsetools/csr_wrap.cxx:2910: error: expected ‘)’ before ‘PRIdPTR’ scipy/sparse/sparsetools/csr_wrap.cxx:2910: warning: spurious trailing ‘%’ in format scipy/sparse/sparsetools/csr_wrap.cxx:2910: warning: too many arguments for format scipy/sparse/sparsetools/csr_wrap.cxx:2917: error: expected ‘)’ before ‘PRIdPTR’ scipy/sparse/sparsetools/csr_wrap.cxx:2917: warning: spurious trailing ‘%’ in format scipy/sparse/sparsetools/csr_wrap.cxx:2917: warning: too many arguments for format error: Command "g++ -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/local/lib/python2.7/site-packages/numpy/core/include -I/usr/local/include/python2.7 -c scipy/sparse/sparsetools/csr_wrap.cxx -o build/temp.linux-x86_64-2.7/scipy/sparse/sparsetools/csr_wrap.o" failed with exit status 1
The error is possibly related the variable 'NPY_INTP_FMT' (defined in numpy/core/include/numpy/ndarraytypes.h). A grep shows these files: scipy/sparse/sparsetools/coo_wrap.cxx: sprintf(s,"%" NPY_INTP_FMT ",", size[i]); scipy/sparse/sparsetools/coo_wrap.cxx: sprintf(s,"%" NPY_INTP_FMT ",", array_size(ary,i)); scipy/sparse/sparsetools/bsr_wrap.cxx: sprintf(s,"%" NPY_INTP_FMT ",", size[i]); scipy/sparse/sparsetools/bsr_wrap.cxx: sprintf(s,"%" NPY_INTP_FMT ",", array_size(ary,i)); scipy/sparse/sparsetools/numpy.i: sprintf(s,"%" NPY_INTP_FMT ",", size[i]); scipy/sparse/sparsetools/numpy.i: sprintf(s,"%" NPY_INTP_FMT ",", array_size(ary,i)); scipy/sparse/sparsetools/csr_wrap.cxx: sprintf(s,"%" NPY_INTP_FMT ",", size[i]); scipy/sparse/sparsetools/csr_wrap.cxx: sprintf(s,"%" NPY_INTP_FMT ",", array_size(ary,i)); scipy/sparse/sparsetools/csc_wrap.cxx: sprintf(s,"%" NPY_INTP_FMT ",", size[i]); scipy/sparse/sparsetools/csc_wrap.cxx: sprintf(s,"%" NPY_INTP_FMT ",", array_size(ary,i)); scipy/sparse/sparsetools/dia_wrap.cxx: sprintf(s,"%" NPY_INTP_FMT ",", size[i]); scipy/sparse/sparsetools/dia_wrap.cxx: sprintf(s,"%" NPY_INTP_FMT ",", array_size(ary,i));
Note that the scipy/sparse/sparsetools/numpy.i contains tabs in some places instead of spaces.
The ndarraytypes.h is present in /usr/local/lib/python2.7/site-packages/numpy/core/include/numpy/
Bruce
_______________________________________________ SciPy-Dev mailing list SciPy-Dev@scipy.org http://mail.scipy.org/mailman/listinfo/scipy-dev
On Thu, Jul 8, 2010 at 5:33 AM, Ralf Gommers <ralf.gommers@googlemail.com> wrote:
On Wed, Jul 7, 2010 at 5:27 AM, Bruce Southey <bsouthey@gmail.com> wrote:
Hi, I failed to get the scipy 0.8 rc1 and SVN to build under Python2.7 with numpy '2.0.0.dev8469' and gcc version 4.4.4 20100503 (Red Hat 4.4.4-2) (GCC) . But scipy does compile with Python 2.6.
If this is easy to fix on linux (and someone comes up with that fix) it makes sense to do so. On OS X the problems are more serious and it looks like they require changes to numpy.distutils first, so it's not going to work with numpy 1.4.1 in any case. So full support for 2.7 on all platforms is not going to happen for the 0.8.0 release.
Not that I know what I am doing but I do have recent numpy and scipy installed on oxs running py2.7. I did use numscon and installed 64bit, I get 4 errors and 2 failures. Lots of warnings, "Warning: invalid value encountered in absolute" not sure what those are about.
scipy.test() Running unit tests for scipy NumPy version 2.0.0.dev NumPy is installed in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy SciPy version 0.9.0.dev SciPy is installed in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/scipy Python version 2.7rc2+ (trunk, Jun 27 2010, 21:30:09) [GCC 4.2.1 (Apple Inc. build 5659)] nose version 0.11.3 <SNIP> ====================================================================== ERROR: test_decomp.test_lapack_misaligned(<function solve at 0x10302f8c0>, (array([[ 1.734e-255, 8.189e-217, 4.025e-178, 1.903e-139, 9.344e-101, 4.422e-062, 2.169e-023, 1.028e+016, 5.035e+054, 2.388e+093], [ 1.169e+132, 5.549e+170, 2.713e+209, 1.290e+248, 6.299e+286, -9.272e-292, -4.524e-253, -2.155e-214, -1.050e-175, -5.007e-137], [ -2.438e-098, -1.163e-059, -5.659e-021, -2.703e+018, -1.314e+057, -6.281e+095, -3.049e+134, -1.459e+173, -7.078e+211, -3.391e+250], [ -1.643e+289, 3.524e-294, 1.734e-255, 8.189e-217, 4.025e-178, 1.903e-139, 9.344e-101, 4.422e-062, 2.169e-023, 1.028e+016], [ 5.035e+054, 2.388e+093, 1.169e+132, 5.549e+170, 2.713e+209, 1.290e+248, 6.299e+286, -9.272e-292, -4.524e-253, -2.155e-214], [ -1.050e-175, -5.007e-137, -2.438e-098, -1.163e-059, -5.659e-021, -2.703e+018, -1.314e+057, -6.281e+095, -3.049e+134, -1.459e+173], [ -7.078e+211, -3.391e+250, -1.643e+289, 3.524e-294, 1.734e-255, 8.189e-217, 4.025e-178, 1.903e-139, 9.344e-101, 4.422e-062], [ 2.169e-023, 1.028e+016, 5.035e+054, 2.388e+093, 1.169e+132, 5.549e+170, 2.713e+209, 1.290e+248, 6.299e+286, -9.272e-292], [ -4.524e-253, -2.155e-214, -1.050e-175, -5.007e-137, -2.438e-098, -1.163e-059, -5.659e-021, -2.703e+018, -1.314e+057, -6.281e+095], [ -3.049e+134, -1.459e+173, -7.078e+211, -3.391e+250, -1.643e+289, 3.524e-294, 1.734e-255, 8.189e-217, 4.025e-178, 1.903e-139]]), array([ NaN, NaN, NaN, NaN, NaN, -3.264e+62, 6.682e+23, 9.710e-15, -1.988e-53, -2.520e-94])), {'overwrite_a': True, 'overwrite_b': True}) test_decomp.test_lapack_misaligned(<function solve at 0x10302f8c0>, (array([[ 1.734e-255, 8.189e-217, 4.025e-178, 1.903e-139, 9.344e-101,
Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/nose/case.py", line 186, in runTest self.test(*self.arg) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/scipy/linalg/tests/test_decomp.py", line 1074, in check_lapack_misaligned func(*a,**kwargs) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/scipy/linalg/basic.py", line 49, in solve a1, b1 = map(asarray_chkfinite,(a,b)) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/lib/function_base.py", line 528, in asarray_chkfinite "array must not contain infs or NaNs") ValueError: array must not contain infs or NaNs ====================================================================== ERROR: test_complex_nonsymmetric_modes (test_arpack.TestEigenComplexNonSymmetric) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py", line 267, in test_complex_nonsymmetric_modes self.eval_evec(m,typ,k,which) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py", line 248, in eval_evec eval,evec=eigen(a,k,which=which) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/scipy/sparse/linalg/eigen/arpack/arpack.py", line 397, in eigen params.iterate() File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/scipy/sparse/linalg/eigen/arpack/arpack.py", line 222, in iterate raise RuntimeError("Error info=%d in arpack" % self.info) RuntimeError: Error info=-8 in arpack ====================================================================== ERROR: test_nonsymmetric_modes (test_arpack.TestEigenNonSymmetric) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py", line 204, in test_nonsymmetric_modes self.eval_evec(m,typ,k,which) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py", line 186, in eval_evec eval,evec=eigen(a,k,which=which,**kwds) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/scipy/sparse/linalg/eigen/arpack/arpack.py", line 397, in eigen params.iterate() File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/scipy/sparse/linalg/eigen/arpack/arpack.py", line 222, in iterate raise RuntimeError("Error info=%d in arpack" % self.info) RuntimeError: Error info=-8 in arpack ====================================================================== ERROR: test_starting_vector (test_arpack.TestEigenNonSymmetric) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py", line 214, in test_starting_vector self.eval_evec(self.symmetric[0],typ,k,which='LM',v0=v0) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py", line 186, in eval_evec eval,evec=eigen(a,k,which=which,**kwds) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/scipy/sparse/linalg/eigen/arpack/arpack.py", line 397, in eigen params.iterate() File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/scipy/sparse/linalg/eigen/arpack/arpack.py", line 222, in iterate raise RuntimeError("Error info=%d in arpack" % self.info) RuntimeError: Error info=-8 in arpack ====================================================================== FAIL: test_x_stride (test_fblas.TestCgemv) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/scipy/linalg/tests/test_fblas.py", line 348, in test_x_stride assert_array_almost_equal(desired_y,y) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/testing/utils.py", line 774, in assert_array_almost_equal header='Arrays are not almost equal') File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/testing/utils.py", line 618, in assert_array_compare raise AssertionError(msg) AssertionError: Arrays are not almost equal (mismatch 33.3333333333%) x: array([ 2.58077621 -2.58077621j, -15.25132084+17.25131989j, 16.81481171-12.81481171j], dtype=complex64) y: array([ 2.58077621 -2.58077621j, -15.25132084+17.25132179j, 16.81481171-12.81481171j], dtype=complex64)
raise AssertionError('\nArrays are not almost equal\n\n(mismatch 33.3333333333%)\n x: array([ 2.58077621 -2.58077621j, -15.25132084+17.25131989j,\n 16.81481171-12.81481171j], dtype=complex64)\n y: array([ 2.58077621 -2.58077621j, -15.25132084+17.25132179j,\n 16.81481171-12.81481171j], dtype=complex64)')
====================================================================== FAIL: test_complex_symmetric_modes (test_arpack.TestEigenComplexSymmetric) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py", line 156, in test_complex_symmetric_modes self.eval_evec(self.symmetric[0],typ,k,which) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py", line 145, in eval_evec assert_array_almost_equal(eval,exact_eval,decimal=_ndigits[typ]) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/testing/utils.py", line 774, in assert_array_almost_equal header='Arrays are not almost equal') File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/testing/utils.py", line 618, in assert_array_compare raise AssertionError(msg) AssertionError: Arrays are not almost equal (mismatch 100.0%) x: array([ 1.07188725 +6.23436023e-08j, 4.91291142 -3.25412906e-08j], dtype=complex64) y: array([ 5.+0.j, 6.+0.j], dtype=complex64)
raise AssertionError('\nArrays are not almost equal\n\n(mismatch 100.0%)\n x: array([ 1.07188725 +6.23436023e-08j, 4.91291142 -3.25412906e-08j], dtype=complex64)\n y: array([ 5.+0.j, 6.+0.j], dtype=complex64)')
---------------------------------------------------------------------- Ran 4612 tests in 153.836s FAILED (KNOWNFAIL=11, SKIP=35, errors=4, failures=2) <nose.result.TextTestResult run=4612 errors=4 failures=2> Vincent
This is http://projects.scipy.org/scipy/ticket/1180 by the way.
Ralf
building 'scipy.sparse.sparsetools._csr' extension compiling C++ sources C compiler: g++ -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -fPIC
compile options: '-I/usr/local/lib/python2.7/site-packages/numpy/core/include -I/usr/local/include/python2.7 -c' g++: scipy/sparse/sparsetools/csr_wrap.cxx scipy/sparse/sparsetools/csr_wrap.cxx: In function ‘int require_size(PyArrayObject*, npy_intp*, int)’: scipy/sparse/sparsetools/csr_wrap.cxx:2910: error: expected ‘)’ before ‘PRIdPTR’ scipy/sparse/sparsetools/csr_wrap.cxx:2910: warning: spurious trailing ‘%’ in format scipy/sparse/sparsetools/csr_wrap.cxx:2910: warning: too many arguments for format scipy/sparse/sparsetools/csr_wrap.cxx:2917: error: expected ‘)’ before ‘PRIdPTR’ scipy/sparse/sparsetools/csr_wrap.cxx:2917: warning: spurious trailing ‘%’ in format scipy/sparse/sparsetools/csr_wrap.cxx:2917: warning: too many arguments for format scipy/sparse/sparsetools/csr_wrap.cxx: In function ‘int require_size(PyArrayObject*, npy_intp*, int)’: scipy/sparse/sparsetools/csr_wrap.cxx:2910: error: expected ‘)’ before ‘PRIdPTR’ scipy/sparse/sparsetools/csr_wrap.cxx:2910: warning: spurious trailing ‘%’ in format scipy/sparse/sparsetools/csr_wrap.cxx:2910: warning: too many arguments for format scipy/sparse/sparsetools/csr_wrap.cxx:2917: error: expected ‘)’ before ‘PRIdPTR’ scipy/sparse/sparsetools/csr_wrap.cxx:2917: warning: spurious trailing ‘%’ in format scipy/sparse/sparsetools/csr_wrap.cxx:2917: warning: too many arguments for format error: Command "g++ -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/local/lib/python2.7/site-packages/numpy/core/include -I/usr/local/include/python2.7 -c scipy/sparse/sparsetools/csr_wrap.cxx -o build/temp.linux-x86_64-2.7/scipy/sparse/sparsetools/csr_wrap.o" failed with exit status 1
The error is possibly related the variable 'NPY_INTP_FMT' (defined in numpy/core/include/numpy/ndarraytypes.h). A grep shows these files: scipy/sparse/sparsetools/coo_wrap.cxx: sprintf(s,"%" NPY_INTP_FMT ",", size[i]); scipy/sparse/sparsetools/coo_wrap.cxx: sprintf(s,"%" NPY_INTP_FMT ",", array_size(ary,i)); scipy/sparse/sparsetools/bsr_wrap.cxx: sprintf(s,"%" NPY_INTP_FMT ",", size[i]); scipy/sparse/sparsetools/bsr_wrap.cxx: sprintf(s,"%" NPY_INTP_FMT ",", array_size(ary,i)); scipy/sparse/sparsetools/numpy.i: sprintf(s,"%" NPY_INTP_FMT ",", size[i]); scipy/sparse/sparsetools/numpy.i: sprintf(s,"%" NPY_INTP_FMT ",", array_size(ary,i)); scipy/sparse/sparsetools/csr_wrap.cxx: sprintf(s,"%" NPY_INTP_FMT ",", size[i]); scipy/sparse/sparsetools/csr_wrap.cxx: sprintf(s,"%" NPY_INTP_FMT ",", array_size(ary,i)); scipy/sparse/sparsetools/csc_wrap.cxx: sprintf(s,"%" NPY_INTP_FMT ",", size[i]); scipy/sparse/sparsetools/csc_wrap.cxx: sprintf(s,"%" NPY_INTP_FMT ",", array_size(ary,i)); scipy/sparse/sparsetools/dia_wrap.cxx: sprintf(s,"%" NPY_INTP_FMT ",", size[i]); scipy/sparse/sparsetools/dia_wrap.cxx: sprintf(s,"%" NPY_INTP_FMT ",", array_size(ary,i));
Note that the scipy/sparse/sparsetools/numpy.i contains tabs in some places instead of spaces.
The ndarraytypes.h is present in /usr/local/lib/python2.7/site-packages/numpy/core/include/numpy/
Bruce
_______________________________________________ SciPy-Dev mailing list SciPy-Dev@scipy.org http://mail.scipy.org/mailman/listinfo/scipy-dev
_______________________________________________ SciPy-Dev mailing list SciPy-Dev@scipy.org http://mail.scipy.org/mailman/listinfo/scipy-dev
On Thu, Jul 8, 2010 at 9:05 PM, Vincent Davis <vincent@vincentdavis.net>wrote:
On Thu, Jul 8, 2010 at 5:33 AM, Ralf Gommers <ralf.gommers@googlemail.com> wrote:
On Wed, Jul 7, 2010 at 5:27 AM, Bruce Southey <bsouthey@gmail.com>
Hi, I failed to get the scipy 0.8 rc1 and SVN to build under Python2.7 with numpy '2.0.0.dev8469' and gcc version 4.4.4 20100503 (Red Hat 4.4.4-2) (GCC) . But scipy does compile with Python 2.6.
If this is easy to fix on linux (and someone comes up with that fix) it makes sense to do so. On OS X the problems are more serious and it looks like they require changes to numpy.distutils first, so it's not going to work with numpy 1.4.1 in any case. So full support for 2.7 on all
wrote: platforms
is not going to happen for the 0.8.0 release.
Not that I know what I am doing but I do have recent numpy and scipy installed on oxs running py2.7. I did use numscon and installed 64bit, I get 4 errors and 2 failures. Lots of warnings, "Warning: invalid value encountered in absolute" not sure what those are about.
Those errors are all known, so all seems fine. How did you install Python 2.7? I see your python says it's compiled with gcc 4.2, while I remember my scipy builds picking up 4.0 by default.
Ralf
On Thu, Jul 8, 2010 at 7:40 AM, Ralf Gommers <ralf.gommers@googlemail.com> wrote:
On Thu, Jul 8, 2010 at 9:05 PM, Vincent Davis <vincent@vincentdavis.net> wrote:
On Thu, Jul 8, 2010 at 5:33 AM, Ralf Gommers <ralf.gommers@googlemail.com> wrote:
On Wed, Jul 7, 2010 at 5:27 AM, Bruce Southey <bsouthey@gmail.com> wrote:
Hi, I failed to get the scipy 0.8 rc1 and SVN to build under Python2.7 with numpy '2.0.0.dev8469' and gcc version 4.4.4 20100503 (Red Hat 4.4.4-2) (GCC) . But scipy does compile with Python 2.6.
If this is easy to fix on linux (and someone comes up with that fix) it makes sense to do so. On OS X the problems are more serious and it looks like they require changes to numpy.distutils first, so it's not going to work with numpy 1.4.1 in any case. So full support for 2.7 on all platforms is not going to happen for the 0.8.0 release.
Not that I know what I am doing but I do have recent numpy and scipy installed on oxs running py2.7. I did use numscon and installed 64bit, I get 4 errors and 2 failures. Lots of warnings, "Warning: invalid value encountered in absolute" not sure what those are about.
Those errors are all known, so all seems fine. How did you install Python 2.7? I see your python says it's compiled with gcc 4.2, while I remember my scipy builds picking up 4.0 by default.
Well it was not skill or knowledge :-) pure blind trial and error but it seems simple now. for python 2.7 from source ./configure --with-universal-archs=64-bit --enable-universalsdk=/Developer/SDKs/MacOSX10.5.sdk --enable-framework then make, make install I have been taking notes so I can repeat it. More details here (numpy, scipy) http://vincentdavis.net/installing-python By the way what are "Warning: invalid value encountered in absolute" warnings I tried to find out more but didn't find much. Vincent
Ralf
_______________________________________________ SciPy-Dev mailing list SciPy-Dev@scipy.org http://mail.scipy.org/mailman/listinfo/scipy-dev
On Thu, Jul 8, 2010 at 9:50 PM, Vincent Davis <vincent@vincentdavis.net>wrote:
On Thu, Jul 8, 2010 at 7:40 AM, Ralf Gommers <ralf.gommers@googlemail.com> wrote:
On Thu, Jul 8, 2010 at 9:05 PM, Vincent Davis <vincent@vincentdavis.net> wrote:
On Thu, Jul 8, 2010 at 5:33 AM, Ralf Gommers <ralf.gommers@googlemail.com> wrote:
On Wed, Jul 7, 2010 at 5:27 AM, Bruce Southey <bsouthey@gmail.com> wrote:
Hi, I failed to get the scipy 0.8 rc1 and SVN to build under Python2.7
with
numpy '2.0.0.dev8469' and gcc version 4.4.4 20100503 (Red Hat 4.4.4-2) (GCC) . But scipy does compile with Python 2.6.
If this is easy to fix on linux (and someone comes up with that fix) it makes sense to do so. On OS X the problems are more serious and it looks like they require changes to numpy.distutils first, so it's not going to work with numpy 1.4.1 in any case. So full support for 2.7 on all platforms is not going to happen for the 0.8.0 release.
Not that I know what I am doing but I do have recent numpy and scipy installed on oxs running py2.7. I did use numscon and installed 64bit, I get 4 errors and 2 failures. Lots of warnings, "Warning: invalid value encountered in absolute" not sure what those are about.
Those errors are all known, so all seems fine. How did you install Python 2.7? I see your python says it's compiled with gcc 4.2, while I remember my scipy builds picking up 4.0 by default.
Well it was not skill or knowledge :-) pure blind trial and error but it seems simple now. for python 2.7 from source ./configure --with-universal-archs=64-bit --enable-universalsdk=/Developer/SDKs/MacOSX10.5.sdk --enable-framework then make, make install
I have been taking notes so I can repeat it. More details here (numpy, scipy) http://vincentdavis.net/installing-python
Interesting. When I try the same build command for numpy with either of the 2.7 binaries from python.org (both built with gcc-4.0), numscons aborts after failing this test: # We check declaration AND type because that's how distutils does it. if config.CheckDeclaration('PY_LONG_LONG', includes = '#include <Python.h>\n'): st = config.CheckTypeSize('PY_LONG_LONG', includes = '#include <Python.h>\n') assert not st == 0 And setup.py install fails because it complains about missing x86_64 architecture.
By the way what are "Warning: invalid value encountered in absolute" warnings I tried to find out more but didn't find much. Vincent
Those are from ufuncs operating on masked arrays - can't remember why it was hard to fix, but it's a known (and annoying) issue.
Cheers, Ralf
On Thu, Jul 8, 2010 at 9:34 AM, Ralf Gommers <ralf.gommers@googlemail.com> wrote:
On Thu, Jul 8, 2010 at 9:50 PM, Vincent Davis <vincent@vincentdavis.net> wrote:
On Thu, Jul 8, 2010 at 7:40 AM, Ralf Gommers <ralf.gommers@googlemail.com> wrote:
On Thu, Jul 8, 2010 at 9:05 PM, Vincent Davis <vincent@vincentdavis.net> wrote:
On Thu, Jul 8, 2010 at 5:33 AM, Ralf Gommers <ralf.gommers@googlemail.com> wrote:
On Wed, Jul 7, 2010 at 5:27 AM, Bruce Southey <bsouthey@gmail.com> wrote:
Hi, I failed to get the scipy 0.8 rc1 and SVN to build under Python2.7 with numpy '2.0.0.dev8469' and gcc version 4.4.4 20100503 (Red Hat 4.4.4-2) (GCC) . But scipy does compile with Python 2.6.
If this is easy to fix on linux (and someone comes up with that fix) it makes sense to do so. On OS X the problems are more serious and it looks like they require changes to numpy.distutils first, so it's not going to work with numpy 1.4.1 in any case. So full support for 2.7 on all platforms is not going to happen for the 0.8.0 release.
Not that I know what I am doing but I do have recent numpy and scipy installed on oxs running py2.7. I did use numscon and installed 64bit, I get 4 errors and 2 failures. Lots of warnings, "Warning: invalid value encountered in absolute" not sure what those are about.
Those errors are all known, so all seems fine. How did you install Python 2.7? I see your python says it's compiled with gcc 4.2, while I remember my scipy builds picking up 4.0 by default.
Well it was not skill or knowledge :-) pure blind trial and error but it seems simple now. for python 2.7 from source ./configure --with-universal-archs=64-bit --enable-universalsdk=/Developer/SDKs/MacOSX10.5.sdk --enable-framework then make, make install
I have been taking notes so I can repeat it. More details here (numpy, scipy) http://vincentdavis.net/installing-python
Interesting. When I try the same build command for numpy with either of the 2.7 binaries from python.org (both built with gcc-4.0), numscons aborts after failing this test: # We check declaration AND type because that's how distutils does it. if config.CheckDeclaration('PY_LONG_LONG', includes = '#include <Python.h>\n'): st = config.CheckTypeSize('PY_LONG_LONG', includes = '#include <Python.h>\n') assert not st == 0
And setup.py install fails because it complains about missing x86_64 architecture.
Just ran the first part again, seems to work for me, see full output attached. LDFLAGS="-arch x86_64" FFLAGS="-arch x86_64" py27 setupscons.py scons btw I just noticed that if I copy past this from the webpage the quotes are wrong, MacBookPro-new-2:numpy vmd$ py27 Python 2.7rc2+ (trunk, Jun 27 2010, 21:30:09) [GCC 4.2.1 (Apple Inc. build 5659)] on darwin Type "help", "copyright", "credits" or "license" for more information. Vincent
By the way what are "Warning: invalid value encountered in absolute" warnings I tried to find out more but didn't find much. Vincent
Those are from ufuncs operating on masked arrays - can't remember why it was hard to fix, but it's a known (and annoying) issue.
Cheers, Ralf
_______________________________________________ SciPy-Dev mailing list SciPy-Dev@scipy.org http://mail.scipy.org/mailman/listinfo/scipy-dev
On 07/08/2010 06:33 AM, Ralf Gommers wrote:
On Wed, Jul 7, 2010 at 5:27 AM, Bruce Southey <bsouthey@gmail.com <mailto:bsouthey@gmail.com>> wrote:
Hi, I failed to get the scipy 0.8 rc1 and SVN to build under Python2.7 with numpy '2.0.0.dev8469' and gcc version 4.4.4 20100503 (Red Hat 4.4.4-2) (GCC) . But scipy does compile with Python 2.6.
If this is easy to fix on linux (and someone comes up with that fix) it makes sense to do so. On OS X the problems are more serious and it looks like they require changes to numpy.distutils first, so it's not going to work with numpy 1.4.1 in any case. So full support for 2.7 on all platforms is not going to happen for the 0.8.0 release.
This is http://projects.scipy.org/scipy/ticket/1180 by the way.
Ralf
building 'scipy.sparse.sparsetools._csr' extension compiling C++ sources C compiler: g++ -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -fPIC
compile options: '-I/usr/local/lib/python2.7/site-packages/numpy/core/include -I/usr/local/include/python2.7 -c' g++: scipy/sparse/sparsetools/csr_wrap.cxx scipy/sparse/sparsetools/csr_wrap.cxx: In function ‘int require_size(PyArrayObject*, npy_intp*, int)’: scipy/sparse/sparsetools/csr_wrap.cxx:2910: error: expected ‘)’ before ‘PRIdPTR’ scipy/sparse/sparsetools/csr_wrap.cxx:2910: warning: spurious trailing ‘%’ in format scipy/sparse/sparsetools/csr_wrap.cxx:2910: warning: too many arguments for format scipy/sparse/sparsetools/csr_wrap.cxx:2917: error: expected ‘)’ before ‘PRIdPTR’ scipy/sparse/sparsetools/csr_wrap.cxx:2917: warning: spurious trailing ‘%’ in format scipy/sparse/sparsetools/csr_wrap.cxx:2917: warning: too many arguments for format scipy/sparse/sparsetools/csr_wrap.cxx: In function ‘int require_size(PyArrayObject*, npy_intp*, int)’: scipy/sparse/sparsetools/csr_wrap.cxx:2910: error: expected ‘)’ before ‘PRIdPTR’ scipy/sparse/sparsetools/csr_wrap.cxx:2910: warning: spurious trailing ‘%’ in format scipy/sparse/sparsetools/csr_wrap.cxx:2910: warning: too many arguments for format scipy/sparse/sparsetools/csr_wrap.cxx:2917: error: expected ‘)’ before ‘PRIdPTR’ scipy/sparse/sparsetools/csr_wrap.cxx:2917: warning: spurious trailing ‘%’ in format scipy/sparse/sparsetools/csr_wrap.cxx:2917: warning: too many arguments for format error: Command "g++ -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/local/lib/python2.7/site-packages/numpy/core/include -I/usr/local/include/python2.7 -c scipy/sparse/sparsetools/csr_wrap.cxx -o build/temp.linux-x86_64-2.7/scipy/sparse/sparsetools/csr_wrap.o" failed with exit status 1
The error is possibly related the variable 'NPY_INTP_FMT' (defined in numpy/core/include/numpy/ndarraytypes.h). A grep shows these files: scipy/sparse/sparsetools/coo_wrap.cxx: sprintf(s,"%" NPY_INTP_FMT ",", size[i]); scipy/sparse/sparsetools/coo_wrap.cxx: sprintf(s,"%" NPY_INTP_FMT ",", array_size(ary,i)); scipy/sparse/sparsetools/bsr_wrap.cxx: sprintf(s,"%" NPY_INTP_FMT ",", size[i]); scipy/sparse/sparsetools/bsr_wrap.cxx: sprintf(s,"%" NPY_INTP_FMT ",", array_size(ary,i)); scipy/sparse/sparsetools/numpy.i: sprintf(s,"%" NPY_INTP_FMT ",", size[i]); scipy/sparse/sparsetools/numpy.i: sprintf(s,"%" NPY_INTP_FMT ",", array_size(ary,i)); scipy/sparse/sparsetools/csr_wrap.cxx: sprintf(s,"%" NPY_INTP_FMT ",", size[i]); scipy/sparse/sparsetools/csr_wrap.cxx: sprintf(s,"%" NPY_INTP_FMT ",", array_size(ary,i)); scipy/sparse/sparsetools/csc_wrap.cxx: sprintf(s,"%" NPY_INTP_FMT ",", size[i]); scipy/sparse/sparsetools/csc_wrap.cxx: sprintf(s,"%" NPY_INTP_FMT ",", array_size(ary,i)); scipy/sparse/sparsetools/dia_wrap.cxx: sprintf(s,"%" NPY_INTP_FMT ",", size[i]); scipy/sparse/sparsetools/dia_wrap.cxx: sprintf(s,"%" NPY_INTP_FMT ",", array_size(ary,i));
Note that the scipy/sparse/sparsetools/numpy.i contains tabs in some places instead of spaces.
The ndarraytypes.h is present in /usr/local/lib/python2.7/site-packages/numpy/core/include/numpy/
Bruce
_______________________________________________ SciPy-Dev mailing list SciPy-Dev@scipy.org <mailto:SciPy-Dev@scipy.org> http://mail.scipy.org/mailman/listinfo/scipy-dev
_______________________________________________ SciPy-Dev mailing list SciPy-Dev@scipy.org http://mail.scipy.org/mailman/listinfo/scipy-dev
Okay, This is specific numpy error is not new just keeps returning! Aug 2008: http://www.mail-archive.com/numpy-discussion@scipy.org/msg11614.html June 2009: http://mail.scipy.org/pipermail/scipy-user/2009-June/021436.html Scipy builds when make David's hack: http://mail.scipy.org/pipermail/scipy-user/2009-June/021438.html However, I do not know the specific cause. Bruce
Bruce Southey <bsouthey <at> gmail.com> writes:
Hi, I failed to get the scipy 0.8 rc1 and SVN to build under Python2.7 with numpy '2.0.0.dev8469' and gcc version 4.4.4 20100503 (Red Hat 4.4.4-2) (GCC) . But scipy does compile with Python 2.6.
building 'scipy.sparse.sparsetools._csr' extension compiling C++ sources C compiler: g++ -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -fPIC ....
Bruce, I've got precisely the problem when attempting to compile Scipy under centos-5-x86_64 I've spent 2 days already trying to figure out what the problem is... Any ideas/clues on the solution?.. Any help is highly appreciated! Vitali
On 09/27/2010 04:19 PM, Adrian wrote:
I've got precisely the problem when attempting to compile Scipy under centos-5-x86_64 I'm having the same issue on CentOS-4.4 with Python 2.7, was a resolution ever found?
_______________________________________________ SciPy-Dev mailing list SciPy-Dev@scipy.org http://mail.scipy.org/mailman/listinfo/scipy-dev This should be have been fixed about two months ago (r6645 <http://projects.scipy.org/scipy/changeset/6645>, r6646 <http://projects.scipy.org/scipy/changeset/6646>), see ticket 1180: http://projects.scipy.org/scipy/ticket/1180
Bruce
participants (5)
-
Adrian -
Bruce Southey -
Ralf Gommers -
Vincent Davis -
Vitali V