[Biopython-dev] NumPy 1.7 and NPY_NO_DEPRECATED_API warnings

hari jayaram harijay at gmail.com
Tue Mar 11 09:37:39 EDT 2014


Hi all,
I just pull-ed from the git repository just now  and after installing the
newest numpy and scipy ( also from their respective git repos)..when I try
to install biopython I get the same error complaining that I need to define
:

#defining NPY_NO_DEPRECATED_API
      NPY_1_7_API_VERSION" [-W#warnings]

I tried adding to file
"/usr/local/lib/python2.7/site-packages/numpy/core/include/numpy/old_defines.h"
the following line


#define  NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION


But it still fails to install with an error as indicated below.

I am sorry I dont know how to work around this.
Thanks for your help

Hari

#################
error message
#################

In file included from
/usr/local/lib/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1725:
/usr/local/lib/python2.7/site-packages/numpy/core/include/numpy/npy_deprecated_api.h:11:2:
warning:
      "Using deprecated NumPy API, disable it by #defining
NPY_NO_DEPRECATED_API
      NPY_1_7_API_VERSION" [-W#warnings]
#warning "Using deprecated NumPy API, disable it by #defining ...
 ^
/usr/local/lib/python2.7/site-packages/numpy/core/include/numpy/npy_deprecated_api.h:23:2:
error:
      Should never include npy_deprecated_api directly.
#error Should never include npy_deprecated_api directly.
 ^
In file included from Bio/Cluster/clustermodule.c:3:
In file included from
/usr/local/lib/python2.7/site-packages/numpy/core/include/numpy/arrayobject.h:15:
In file included from
/usr/local/lib/python2.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:17:
In file included from
/usr/local/lib/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1725:
In file included from
/usr/local/lib/python2.7/site-packages/numpy/core/include/numpy/npy_deprecated_api.h:126:
/usr/local/lib/python2.7/site-packages/numpy/core/include/numpy/old_defines.h:6:2:
error:
      The header "old_defines.h" is deprecated as of NumPy 1.7.
#error The header "old_defines.h" is deprecated as of NumPy 1.7.
 ^
1 warning and 2 errors generated.
error: command 'cc' failed with exit status 1


On Thu, Dec 26, 2013 at 5:28 AM, Michiel de Hoon <mjldehoon at yahoo.com>wrote:

> Fixed; please let us know if you encounter any problems.
>
> -Michiel.
>
>
>
> --------------------------------------------
> On Mon, 9/23/13, Peter Cock <p.j.a.cock at googlemail.com> wrote:
>
>  Subject: [Biopython-dev] NumPy 1.7 and NPY_NO_DEPRECATED_API warnings
>  To: "Biopython-Dev Mailing List" <biopython-dev at biopython.org>
>  Date: Monday, September 23, 2013, 4:58 PM
>
>  Hi all,
>
>  I'm seeing the following warning from NumPy 1.7 with Python
>  3.3 on Mac
>  OS X, and on Linux too. I believe the NumPy version is the
>  critical
>  factor:
>
>  building 'Bio.Cluster.cluster' extension
>  building 'Bio.KDTree._CKDTree' extension
>  building 'Bio.Motif._pwm' extension
>  building 'Bio.motifs._pwm' extension
>
>  all give:
>
>
>  /Users/peterjc/lib/python3.3/site-packages/numpy/core/include/numpy/npy_deprecated_api.h:11:2:
>  warning: "Using
>        deprecated NumPy API, disable it by
>  #defining
>  NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings]
>
>  According to this page,
>  http://docs.scipy.org/doc/numpy-dev/reference/c-api.deprecations.html
>
>  If we add this line it should confirm our code is clean for
>  NumPy 1.7
>  (and implies to side effects on older NumPy):
>
>  #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
>
>  Unfortunately that seems all four modules have problems
>  doing
>  that, presumably planned NumPy C API changes we need to
>  handle via a version conditional #ifdef?
>
>  Peter
>  _______________________________________________
>  Biopython-dev mailing list
>  Biopython-dev at lists.open-bio.org
>  http://lists.open-bio.org/mailman/listinfo/biopython-dev
>
>
> _______________________________________________
> Biopython-dev mailing list
> Biopython-dev at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/biopython-dev
>


More information about the Biopython-dev mailing list