I have installed Boost.Numpy on Boost 1.54 (
libboost-all-dev) on Ubuntu 14.04.
This version of Numpy installs the library in a structure that you can invoke it like this in C++:
Newer version of Boost (i.e., Boost 1.64+) which comes with Numpy preinstalled, uses a different structure that has the format of:
It seems that having Boost.Numpy on Boost 1.58 is not compatible with code that assumes Numpy is installed through a newer version of Boost (i.e.,
I have some code, let's say package A, (that for some reason does not work with Boost 1.64) that uses Boost 1.54 and some other software, let's say package B, that I build from source that requires Boost with Numpy (and their code assume
I would like to make this two compatible so I can only think of two solutions:
- Modify every code in the package B and change the definition
#include <boost/python/numpy.hpp>to become
<#include <boost/numpy.hpp>(although I am not sure if this will fix 100% the problem)
- Move all the Numpy files from my system from where they are to
boost/pythonso they are compatible with package B (since package A does not need Numpy).
I am not sure if the two solutions will be appropriate or if there is a better way to do this? I am currently on a clean install and I don't want to break anything.
Unfortunately, I also tried to build package B with Boost 1.64 and package A with Boost 1.54 but the two are talking to each other and I found out that having the two with different Boost versions causes segmentation fault, so I definitely need to avoid this solution.