How to compile Scipy-1.4.1 in Jetson nano?

For some reason I need install Scipy-1.4.1 in Jetson nano , but use apt install python3-scipy only install 0.19.1 version.

I compile it from source code, but there are some error

cc1plus: warning: command line option ‘-std=c99’ is valid for C/ObjC but not for C++
scipy/fft/_pocketfft/pypocketfft.cxx: In function ‘pocketfft::detail::shape_t {anonymous}::makeaxes(const pybind11::array&, const pybind11::object&)’:
scipy/fft/_pocketfft/pypocketfft.cxx:74:12: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     if ((sz>=ndim) || (sz<0))
          ~~^~~~~~
scipy/fft/_pocketfft/pypocketfft.cxx: At global scope:
scipy/fft/_pocketfft/pypocketfft.cxx:707:16: error: expected constructor, destructor, or type conversion before ‘(’ token
 PYBIND11_MODULE(pypocketfft, m)
                ^
scipy/fft/_pocketfft/pypocketfft.cxx: In instantiation of ‘pybind11::array_t<T> {anonymous}::prepare_output(pybind11::object&, pocketfft::detail::shape_t&) [with T = std::complex<double>; pocketfft::detail::shape_t = std::vector<long unsigned int>]’:
scipy/fft/_pocketfft/pypocketfft.cxx:122:40:   required from ‘pybind11::array {anonymous}::c2c_internal(const pybind11::array&, const pybind11::object&, bool, int, pybind11::object&, size_t) [with T = double; size_t = long unsigned int]’
scipy/fft/_pocketfft/pypocketfft.cxx:168:5:   required from here
scipy/fft/_pocketfft/pypocketfft.cxx:111:12: error: ‘class pybind11::array_t<std::complex<double> >’ has no member named ‘is’
   if (!tmp.is(out_)) // a new object was created during casting
        ~~~~^~
scipy/fft/_pocketfft/pypocketfft.cxx: In instantiation of ‘pybind11::array_t<T> {anonymous}::prepare_output(pybind11::object&, pocketfft::detail::shape_t&) [with T = std::complex<float>; pocketfft::detail::shape_t = std::vector<long unsigned int>]’:
scipy/fft/_pocketfft/pypocketfft.cxx:122:40:   required from ‘pybind11::array {anonymous}::c2c_internal(const pybind11::array&, const pybind11::object&, bool, int, pybind11::object&, size_t) [with T = float; size_t = long unsigned int]’
scipy/fft/_pocketfft/pypocketfft.cxx:168:5:   required from here
scipy/fft/_pocketfft/pypocketfft.cxx:111:12: error: ‘class pybind11::array_t<std::complex<float> >’ has no member named ‘is’
scipy/fft/_pocketfft/pypocketfft.cxx: In instantiation of ‘pybind11::array_t<T> {anonymous}::prepare_output(pybind11::object&, pocketfft::detail::shape_t&) [with T = std::complex<long double>; pocketfft::detail::shape_t = std::vector<long unsigned int>]’:
scipy/fft/_pocketfft/pypocketfft.cxx:122:40:   required from ‘pybind11::array {anonymous}::c2c_internal(const pybind11::array&, const pybind11::object&, bool, int, pybind11::object&, size_t) [with T = long double; size_t = long unsigned int]’
scipy/fft/_pocketfft/pypocketfft.cxx:168:5:   required from here
scipy/fft/_pocketfft/pypocketfft.cxx:111:12: error: ‘class pybind11::array_t<std::complex<long double> >’ has no member named ‘is’
scipy/fft/_pocketfft/pypocketfft.cxx: In instantiation of ‘pybind11::array_t<T> {anonymous}::prepare_output(pybind11::object&, pocketfft::detail::shape_t&) [with T = double; pocketfft::detail::shape_t = std::vector<long unsigned int>]’:
scipy/fft/_pocketfft/pypocketfft.cxx:209:36:   required from ‘pybind11::array {anonymous}::r2r_fftpack_internal(const pybind11::array&, const pybind11::object&, bool, bool, int, pybind11::object&, size_t) [with T = double; size_t = long unsigned int]’
scipy/fft/_pocketfft/pypocketfft.cxx:227:3:   required from here
scipy/fft/_pocketfft/pypocketfft.cxx:111:12: error: ‘class pybind11::array_t<double>’ has no member named ‘is’
scipy/fft/_pocketfft/pypocketfft.cxx: In instantiation of ‘pybind11::array_t<T> {anonymous}::prepare_output(pybind11::object&, pocketfft::detail::shape_t&) [with T = float; pocketfft::detail::shape_t = std::vector<long unsigned int>]’:
scipy/fft/_pocketfft/pypocketfft.cxx:209:36:   required from ‘pybind11::array {anonymous}::r2r_fftpack_internal(const pybind11::array&, const pybind11::object&, bool, bool, int, pybind11::object&, size_t) [with T = float; size_t = long unsigned int]’
scipy/fft/_pocketfft/pypocketfft.cxx:227:3:   required from here
scipy/fft/_pocketfft/pypocketfft.cxx:111:12: error: ‘class pybind11::array_t<float>’ has no member named ‘is’
scipy/fft/_pocketfft/pypocketfft.cxx: In instantiation of ‘pybind11::array_t<T> {anonymous}::prepare_output(pybind11::object&, pocketfft::detail::shape_t&) [with T = long double; pocketfft::detail::shape_t = std::vector<long unsigned int>]’:
scipy/fft/_pocketfft/pypocketfft.cxx:209:36:   required from ‘pybind11::array {anonymous}::r2r_fftpack_internal(const pybind11::array&, const pybind11::object&, bool, bool, int, pybind11::object&, size_t) [with T = long double; size_t = long unsigned int]’
scipy/fft/_pocketfft/pypocketfft.cxx:227:3:   required from here
scipy/fft/_pocketfft/pypocketfft.cxx:111:12: error: ‘class pybind11::array_t<long double>’ has no member named ‘is’
In file included from scipy/fft/_pocketfft/pypocketfft.cxx:16:0:
/usr/include/pybind11/numpy.h: In instantiation of ‘static pybind11::dtype pybind11::dtype::of() [with T = std::complex<long double>]’:
/usr/include/pybind11/numpy.h:636:92:   required from ‘static bool pybind11::array_t<T, ExtraFlags>::_check(pybind11::handle) [with T = std::complex<long double>; int ExtraFlags = 16]’
/usr/include/pybind11/pytypes.h:160:47:   required from ‘bool pybind11::isinstance(pybind11::handle) [with T = pybind11::array_t<std::complex<long double> >; typename std::enable_if<std::is_base_of<pybind11::object, T>::value, int>::type <anonymous> = 0]’
scipy/fft/_pocketfft/pypocketfft.cxx:168:5:   required from here
/usr/include/pybind11/numpy.h:260:86: error: ‘dtype’ is not a member of ‘pybind11::detail::npy_format_descriptor<std::complex<long double>, void>’
         return detail::npy_format_descriptor<typename std::remove_cv<T>::type>::dtype();
                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
scipy/fft/_pocketfft/pypocketfft.cxx:689:14: warning: ‘{anonymous}::good_size_DS’ defined but not used [-Wunused-variable]
 const char * good_size_DS = R"""(Returns a good length to pad an FFT to.
              ^~~~~~~~~~~~
scipy/fft/_pocketfft/pypocketfft.cxx:651:13: warning: ‘{anonymous}::dst_DS’ defined but not used [-Wunused-variable]
 const char *dst_DS = R"""(Performs a discrete sine transform.
             ^~~~~~
scipy/fft/_pocketfft/pypocketfft.cxx:612:13: warning: ‘{anonymous}::dct_DS’ defined but not used [-Wunused-variable]
 const char *dct_DS = R"""(Performs a discrete cosine transform.
             ^~~~~~
scipy/fft/_pocketfft/pypocketfft.cxx:580:13: warning: ‘{anonymous}::genuine_hartley_DS’ defined but not used [-Wunused-variable]
 const char *genuine_hartley_DS = R"""(Performs a full Hartley transform.
             ^~~~~~~~~~~~~~~~~~
scipy/fft/_pocketfft/pypocketfft.cxx:549:13: warning: ‘{anonymous}::separable_hartley_DS’ defined but not used [-Wunused-variable]
 const char *separable_hartley_DS = R"""(Performs a separable Hartley transform.
             ^~~~~~~~~~~~~~~~~~~~
scipy/fft/_pocketfft/pypocketfft.cxx:515:13: warning: ‘{anonymous}::r2r_fftpack_DS’ defined but not used [-Wunused-variable]
 const char *r2r_fftpack_DS = R"""(Performs a real-valued FFT using the FFTPACK storage scheme.
             ^~~~~~~~~~~~~~
scipy/fft/_pocketfft/pypocketfft.cxx:480:13: warning: ‘{anonymous}::c2r_DS’ defined but not used [-Wunused-variable]
 const char *c2r_DS = R"""(Performs an FFT whose output is strictly real.
             ^~~~~~
scipy/fft/_pocketfft/pypocketfft.cxx:447:13: warning: ‘{anonymous}::r2c_DS’ defined but not used [-Wunused-variable]
 const char *r2c_DS = R"""(Performs an FFT whose input is strictly real.
             ^~~~~~
scipy/fft/_pocketfft/pypocketfft.cxx:416:13: warning: ‘{anonymous}::c2c_DS’ defined but not used [-Wunused-variable]
 const char *c2c_DS = R"""(Performs a complex FFT.
             ^~~~~~
scipy/fft/_pocketfft/pypocketfft.cxx:404:13: warning: ‘{anonymous}::pypocketfft_DS’ defined but not used [-Wunused-variable]
 const char *pypocketfft_DS = R"""(Fast Fourier and Hartley transforms.
             ^~~~~~~~~~~~~~
scipy/fft/_pocketfft/pypocketfft.cxx:380:13: warning: ‘PyObject* {anonymous}::good_size(PyObject*, PyObject*)’ defined but not used [-Wunused-function]
  PyObject * good_size(PyObject * self, PyObject * args)
             ^~~~~~~~~
scipy/fft/_pocketfft/pypocketfft.cxx:373:11: warning: ‘pybind11::array {anonymous}::genuine_hartley(const pybind11::array&, const pybind11::object&, int, pybind11::object&, size_t)’ defined but not used [-Wunused-function]
 py::array genuine_hartley(const py::array &in, const py::object &axes_,
           ^~~~~~~~~~~~~~~
scipy/fft/_pocketfft/pypocketfft.cxx:342:11: warning: ‘pybind11::array {anonymous}::separable_hartley(const pybind11::array&, const pybind11::object&, int, pybind11::object&, size_t)’ defined but not used [-Wunused-function]
 py::array separable_hartley(const py::array &in, const py::object &axes_,
           ^~~~~~~~~~~~~~~~~
scipy/fft/_pocketfft/pypocketfft.cxx:316:11: warning: ‘pybind11::array {anonymous}::c2r(const pybind11::array&, const pybind11::object&, size_t, bool, int, pybind11::object&, size_t)’ defined but not used [-Wunused-function]
 py::array c2r(const py::array &in, const py::object &axes_, size_t lastsize,
           ^~~
scipy/fft/_pocketfft/pypocketfft.cxx:283:11: warning: ‘pybind11::array {anonymous}::dst(const pybind11::array&, int, const pybind11::object&, int, pybind11::object&, size_t)’ defined but not used [-Wunused-function]
 py::array dst(const py::array &in, int type, const py::object &axes_,
           ^~~
scipy/fft/_pocketfft/pypocketfft.cxx:253:11: warning: ‘pybind11::array {anonymous}::dct(const pybind11::array&, int, const pybind11::object&, int, pybind11::object&, size_t)’ defined but not used [-Wunused-function]
 py::array dct(const py::array &in, int type, const py::object &axes_,
           ^~~
scipy/fft/_pocketfft/pypocketfft.cxx:223:11: warning: ‘pybind11::array {anonymous}::r2r_fftpack(const pybind11::array&, const pybind11::object&, bool, bool, int, pybind11::object&, size_t)’ defined but not used [-Wunused-function]
 py::array r2r_fftpack(const py::array &in, const py::object &axes_,
           ^~~~~~~~~~~
scipy/fft/_pocketfft/pypocketfft.cxx:164:11: warning: ‘pybind11::array {anonymous}::c2c(const pybind11::array&, const pybind11::object&, bool, int, pybind11::object&, size_t)’ defined but not used [-Wunused-function]
 py::array c2c(const py::array &a, const py::object &axes_, bool forward,
           ^~~
error: Command "aarch64-linux-gnu-g++ -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -std=c99 -DPOCKETFFT_PTHREADS -I/home/wupeng/.local/include/python3.6m -I/usr/local/include/python3.6 -I/home/wupeng/.local/lib/python3.6/site-packages/numpy/core/include -I/usr/include/python3.6m -c scipy/fft/_pocketfft/pypocketfft.cxx -o build/temp.linux-aarch64-3.6/scipy/fft/_pocketfft/pypocketfft.o -MMD -MF build/temp.linux-aarch64-3.6/scipy/fft/_pocketfft/pypocketfft.o.d -std=c++14 -fvisibility=hidden" failed with exit status 1

Anyone could help me? thank you very much

I upgrade pyblind11 to newest version , the error was gone.

Hi,

Thanks for the update.

We can also compile the scipy 1.1x from source with this comment:
https://devtalk.nvidia.com/default/topic/1066391/jetson-nano/keras-and-scipy-throwing-weird-errors-while-installing-on-jetson-nano-no-links-could-help-me-/post/5415052/#5415052

Thanks.