Numpy 1.11 version gives error during 'make' of graph-tool

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Numpy 1.11 version gives error during 'make' of graph-tool

vineeshvs
I removed the Python 1.60 which comes by default while doing _sudo apt-get install python-numpy_ and installed Python 1.11.1 from Sourceforge and then tried to do _make_ for graph-tool. Getting the following error

Commands used (in graph tool directory)
-------------------------------------------------------
./configure
make
-------------------------------------------------------


Errors
-------------------------------------------------------
make  all-recursive
make[1]: Entering directory `/home/wecare/Downloads/transferred/graph-tool-2.16'
Making all in src
make[2]: Entering directory `/home/wecare/Downloads/transferred/graph-tool-2.16/src'
Making all in graph
make[3]: Entering directory `/home/wecare/Downloads/transferred/graph-tool-2.16/src/graph'
Making all in centrality
make[4]: Entering directory `/home/wecare/Downloads/transferred/graph-tool-2.16/src/graph/centrality'
make[4]: Nothing to be done for `all'.
make[4]: Leaving directory `/home/wecare/Downloads/transferred/graph-tool-2.16/src/graph/centrality'
Making all in clustering
make[4]: Entering directory `/home/wecare/Downloads/transferred/graph-tool-2.16/src/graph/clustering'
  CXX      graph_motifs.lo
In file included from ./../graph_python_interface.hh:47:0,
                 from graph_motifs.cc:26:
./../numpy_bind.hh:30:31: fatal error: numpy/arrayobject.h: No such file or directory
compilation terminated.
make[4]: *** [graph_motifs.lo] Error 1
make[4]: Leaving directory `/home/wecare/Downloads/transferred/graph-tool-2.16/src/graph/clustering'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/wecare/Downloads/transferred/graph-tool-2.16/src/graph'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/wecare/Downloads/transferred/graph-tool-2.16/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/wecare/Downloads/transferred/graph-tool-2.16'
make: *** [all] Error 2
-------------------------------------------------------

_______________________________________________
graph-tool mailing list
[hidden email]
https://lists.skewed.de/mailman/listinfo/graph-tool
Reply | Threaded
Open this post in threaded view
|

Re: Numpy 1.11 version gives error during 'make' of graph-tool

Tiago Peixoto
Administrator
On 28.06.2016 09:07, vineesh vs wrote:
> *The version was 1.60

Surely you mean version 1.6, not 1.60. But as stated in the website, the
minimum required Numpy version is 1.7.

> *I installed the numpy using command line
>
> sudo apt-get install python-numpy

This suggest that you are using a Debian based distribution. If this is
either Ubuntu or Debian itself, I suggest you use the pre-compiled
packages in the website, since they are easier to install than
compilation by hand.

In any case, even after I explicitly asked, you haven't yet given any
precise information about your system, which makes troubleshooting
difficult.

> I removed the Python 1.60 which comes by default while doing _sudo
> apt-get install python-numpy_ and installed Python 1.11.1 from
> Sourceforge and then tried to do _make_ for graph-tool. Getting the
> following error

Surely you mean Numpy, not 'Python'.

In any case the error below:

> ./../numpy_bind.hh:30:31: fatal error: numpy/arrayobject.h: No such file or directory

obviously means that you haven't passed the path of your numpy
installation to ./configure, or that you haven't installed numpy
correctly.

As I said before, in order for us to be able to help you, you need to
give us more information. We need to know, for instance, how you
installed numpy, what is the full output of the configure script, what
are the contents of the config.log file, etc.

Rest assured that none of the issues you are encountering are problems
with graph-tool itself. You just need to install its dependencies
properly.

If you are uncomfortable with learning how to do this, I would like to
recommend again the binary packages. That's why they exist.

Best,
Tiago

--
Tiago de Paula Peixoto <[hidden email]>


_______________________________________________
graph-tool mailing list
[hidden email]
https://lists.skewed.de/mailman/listinfo/graph-tool

signature.asc (836 bytes) Download Attachment
--
Tiago de Paula Peixoto <tiago@skewed.de>
Reply | Threaded
Open this post in threaded view
|

Re: Numpy 1.11 version gives error during 'make' of graph-tool

vineeshvs
> minimum required Numpy version is 1.7

Now I have installed version 1.7.1 from sourceforge.
Downloaded the .tar.gz file from folder extracted it and installed the package using the command: python setup.py install
Verified the version in Python using: import numpy; numpy.version.version

The path where numpy was installed is obtained using the command 'numpy.version' in Python console which gave the following output
<module 'numpy.version' from '/usr/local/lib/python2.7/dist-packages/numpy/version.pyc'>

> you haven't yet given any
> precise information about your system

OS type: 64-bit, Ubuntu 12.04 (precise)
Memory: 15.6 GiB
Processor: Intel® Xeon(R) CPU E5-2620 0 @ 2.00GHz × 12
Graphics: VESA: MGA-G200
Disk: 235 GB

> obviously means that you haven't passed the path of your numpy
> installation to ./configure

Used the following configure command (including the path to numpy obtained from the previous step
./configure CPPFLAGS="-I/usr/include/python2.7"

After that I executed 'make' which gives the following error
-------------------------------------------------------------------------------------------------------------
        make  all-recursive
        make[1]: Entering directory `/home/wecare/Downloads/transferred/graph-tool-2.16'
        Making all in src
        make[2]: Entering directory `/home/wecare/Downloads/transferred/graph-tool-2.16/src'
        Making all in graph
        make[3]: Entering directory `/home/wecare/Downloads/transferred/graph-tool-2.16/src/graph'
        Making all in centrality
        make[4]: Entering directory `/home/wecare/Downloads/transferred/graph-tool-2.16/src/graph/centrality'
          CXX      graph_betweenness.lo
          CXX      graph_closeness.lo
          CXX      graph_eigentrust.lo
          CXX      graph_eigenvector.lo
          CXX      graph_hits.lo
          CXX      graph_katz.lo
          CXX      graph_pagerank.lo
          CXX      graph_trust_transitivity.lo
          CXXLD    libgraph_tool_centrality.la
        make[4]: Leaving directory `/home/wecare/Downloads/transferred/graph-tool-2.16/src/graph/centrality'
        Making all in clustering
        make[4]: Entering directory `/home/wecare/Downloads/transferred/graph-tool-2.16/src/graph/clustering'
          CXX      graph_clustering.lo
          CXX      graph_extended_clustering.lo
          CXX      graph_motifs.lo
        In file included from ./../graph_python_interface.hh:47:0,
                         from graph_motifs.cc:26:
        ./../numpy_bind.hh: In function ‘boost::python::api::object wrap_vector_owned(std::vector<T>&)’:
        ./../numpy_bind.hh:83:34: error: ‘NPY_ARRAY_ALIGNED’ was not declared in this scope
             PyArray_ENABLEFLAGS(ndarray, NPY_ARRAY_ALIGNED | NPY_ARRAY_C_CONTIGUOUS |
                                          ^
        ./../numpy_bind.hh:83:54: error: ‘NPY_ARRAY_C_CONTIGUOUS’ was not declared in this scope
             PyArray_ENABLEFLAGS(ndarray, NPY_ARRAY_ALIGNED | NPY_ARRAY_C_CONTIGUOUS |
                                                              ^
        ./../numpy_bind.hh:84:25: error: ‘NPY_ARRAY_OWNDATA’ was not declared in this scope
                                 NPY_ARRAY_OWNDATA | NPY_ARRAY_WRITEABLE);
                                 ^
        ./../numpy_bind.hh:84:45: error: ‘NPY_ARRAY_WRITEABLE’ was not declared in this scope
                                 NPY_ARRAY_OWNDATA | NPY_ARRAY_WRITEABLE);
                                                     ^
        ./../numpy_bind.hh:84:64: error: there are no arguments to ‘PyArray_ENABLEFLAGS’ that depend on a template parameter, so a declaration of ‘PyArray_ENABLEFLAGS’ must be available [-fpermissive]
                                 NPY_ARRAY_OWNDATA | NPY_ARRAY_WRITEABLE);
                                                                        ^
        ./../numpy_bind.hh:84:64: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
        ./../numpy_bind.hh: In function ‘boost::python::api::object wrap_vector_not_owned(std::vector<T>&)’:
        ./../numpy_bind.hh:101:33: error: ‘NPY_ARRAY_ALIGNED’ was not declared in this scope
             PyArray_ENABLEFLAGS(ndarray,NPY_ARRAY_ALIGNED | NPY_ARRAY_C_CONTIGUOUS |
                                         ^
        ./../numpy_bind.hh:101:53: error: ‘NPY_ARRAY_C_CONTIGUOUS’ was not declared in this scope
             PyArray_ENABLEFLAGS(ndarray,NPY_ARRAY_ALIGNED | NPY_ARRAY_C_CONTIGUOUS |
                                                             ^
        ./../numpy_bind.hh:102:25: error: ‘NPY_ARRAY_WRITEABLE’ was not declared in this scope
                                 NPY_ARRAY_WRITEABLE);
                                 ^
        ./../numpy_bind.hh:102:44: error: there are no arguments to ‘PyArray_ENABLEFLAGS’ that depend on a template parameter, so a declaration of ‘PyArray_ENABLEFLAGS’ must be available [-fpermissive]
                                 NPY_ARRAY_WRITEABLE);
                                                    ^
        ./../numpy_bind.hh: In function ‘boost::python::api::object wrap_multi_array_owned(boost::multi_array<ValueType, Dim>&)’:
        ./../numpy_bind.hh:121:34: error: ‘NPY_ARRAY_ALIGNED’ was not declared in this scope
             PyArray_ENABLEFLAGS(ndarray, NPY_ARRAY_ALIGNED | NPY_ARRAY_C_CONTIGUOUS |
                                          ^
        ./../numpy_bind.hh:121:54: error: ‘NPY_ARRAY_C_CONTIGUOUS’ was not declared in this scope
             PyArray_ENABLEFLAGS(ndarray, NPY_ARRAY_ALIGNED | NPY_ARRAY_C_CONTIGUOUS |
                                                              ^
        ./../numpy_bind.hh:122:25: error: ‘NPY_ARRAY_OWNDATA’ was not declared in this scope
                                 NPY_ARRAY_OWNDATA | NPY_ARRAY_WRITEABLE);
                                 ^
        ./../numpy_bind.hh:122:45: error: ‘NPY_ARRAY_WRITEABLE’ was not declared in this scope
                                 NPY_ARRAY_OWNDATA | NPY_ARRAY_WRITEABLE);
                                                     ^
        ./../numpy_bind.hh:122:64: error: there are no arguments to ‘PyArray_ENABLEFLAGS’ that depend on a template parameter, so a declaration of ‘PyArray_ENABLEFLAGS’ must be available [-fpermissive]
                                 NPY_ARRAY_OWNDATA | NPY_ARRAY_WRITEABLE);
                                                                        ^
        ./../numpy_bind.hh: In function ‘boost::python::api::object wrap_multi_array_not_owned(boost::multi_array<ValueType, Dim>&)’:
        ./../numpy_bind.hh:135:34: error: ‘NPY_ARRAY_ALIGNED’ was not declared in this scope
             PyArray_ENABLEFLAGS(ndarray, NPY_ARRAY_ALIGNED | NPY_ARRAY_C_CONTIGUOUS |
                                          ^
        ./../numpy_bind.hh:135:54: error: ‘NPY_ARRAY_C_CONTIGUOUS’ was not declared in this scope
             PyArray_ENABLEFLAGS(ndarray, NPY_ARRAY_ALIGNED | NPY_ARRAY_C_CONTIGUOUS |
                                                              ^
        ./../numpy_bind.hh:136:25: error: ‘NPY_ARRAY_WRITEABLE’ was not declared in this scope
                                 NPY_ARRAY_WRITEABLE);
                                 ^
        ./../numpy_bind.hh:136:44: error: there are no arguments to ‘PyArray_ENABLEFLAGS’ that depend on a template parameter, so a declaration of ‘PyArray_ENABLEFLAGS’ must be available [-fpermissive]
                                 NPY_ARRAY_WRITEABLE);
                                                    ^
        make[4]: *** [graph_motifs.lo] Error 1
        make[4]: Leaving directory `/home/wecare/Downloads/transferred/graph-tool-2.16/src/graph/clustering'
        make[3]: *** [all-recursive] Error 1
        make[3]: Leaving directory `/home/wecare/Downloads/transferred/graph-tool-2.16/src/graph'
        make[2]: *** [all-recursive] Error 1
        make[2]: Leaving directory `/home/wecare/Downloads/transferred/graph-tool-2.16/src'
        make[1]: *** [all-recursive] Error 1
        make[1]: Leaving directory `/home/wecare/Downloads/transferred/graph-tool-2.16'
        make: *** [all] Error 2
-------------------------------------------------------------------------------------------------------------

How can we solve it?
Reply | Threaded
Open this post in threaded view
|

Re: Numpy 1.11 version gives error during 'make' of graph-tool

vineeshvs
> ./configure CPPFLAGS="-I/usr/include/python2.7"

That was a mistake. The command used was
./configure CPPFLAGS="-I/usr/local/lib/python2.7"
Reply | Threaded
Open this post in threaded view
|

Re: Numpy 1.11 version gives error during 'make' of graph-tool

Tiago Peixoto
Administrator
In reply to this post by vineeshvs
On 28.06.2016 13:07, vineeshvs wrote:
>> minimum required Numpy version is 1.7
>
> Now I have installed version 1.7.1 from sourceforge.
> Downloaded the .tar.gz file from folder extracted it and installed the
> package using the command: python setup.py install
> Verified the version in Python using: import numpy; numpy.version.version

You don't need to install this particular version. This is only the
_minimum_ version. Version 1.11 will work just fine.

> OS type: 64-bit, Ubuntu 12.04 (precise)

This is fairly outdated. Even if you fix the numpy problem, you probably
will run in other problems with Ubuntu 12.04. By far the simplest
approach would be to upgrade to a more recent Ubuntu version and use the
Ubuntu packages available for graph-tool.

>
> Used the following configure command (including the path to numpy obtained
> from the previous step
> ./configure CPPFLAGS="-I/usr/include/python2.7"
>
> That was a mistake. The command used was
> ./configure CPPFLAGS="-I/usr/local/lib/python2.7"

Both are incorrect. In fact, it should not be necessary to pass
anything if numpy was properly installed. Please post the output of:

    import numpy
    print numpy.get_include()

when run from the Python interpreter.

Also, please post the _full_ output of the ./configure command as well
as the entire content of the config.log file.

Best,
Tiago

--
Tiago de Paula Peixoto <[hidden email]>


_______________________________________________
graph-tool mailing list
[hidden email]
https://lists.skewed.de/mailman/listinfo/graph-tool

signature.asc (836 bytes) Download Attachment
--
Tiago de Paula Peixoto <tiago@skewed.de>