cannot import scipy on jetson nano

$ pip3 install scipy


Collecting scipy
  Using cached https://files.pythonhosted.org/packages/a9/b4/5598a706697d1e2929eaf7fe68898ef4bea76e4950b9efbe1ef396b8813a/scipy-1.2.1.tar.gz
Building wheels for collected packages: scipy
  Running setup.py bdist_wheel for scipy ... error
  Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-lbg3d3lz/scipy/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmpkvf760igpip-wheel- --python-tag cp36:
  Running from scipy source directory.
  lapack_opt_info:
  lapack_mkl_info:
  customize UnixCCompiler
    libraries mkl_rt not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/aarch64-linux-gnu']
    NOT AVAILABLE
  
  openblas_lapack_info:
  customize UnixCCompiler
  customize UnixCCompiler
    libraries openblas not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/aarch64-linux-gnu']
    NOT AVAILABLE
  
  openblas_clapack_info:
  customize UnixCCompiler
  customize UnixCCompiler
    libraries openblas,lapack not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/aarch64-linux-gnu']
    NOT AVAILABLE
  
  atlas_3_10_threads_info:
  Setting PTATLAS=ATLAS
  customize UnixCCompiler
    libraries lapack_atlas not found in /usr/local/lib
  customize UnixCCompiler
    libraries tatlas,tatlas not found in /usr/local/lib
  customize UnixCCompiler
    libraries lapack_atlas not found in /usr/lib
  customize UnixCCompiler
    libraries tatlas,tatlas not found in /usr/lib
  customize UnixCCompiler
    libraries lapack_atlas not found in /usr/lib/aarch64-linux-gnu
  customize UnixCCompiler
    libraries tatlas,tatlas not found in /usr/lib/aarch64-linux-gnu
  <class 'numpy.distutils.system_info.atlas_3_10_threads_info'>
    NOT AVAILABLE
  
  atlas_3_10_info:
  customize UnixCCompiler
    libraries lapack_atlas not found in /usr/local/lib
  customize UnixCCompiler
    libraries satlas,satlas not found in /usr/local/lib
  customize UnixCCompiler
    libraries lapack_atlas not found in /usr/lib
  customize UnixCCompiler
    libraries satlas,satlas not found in /usr/lib
  customize UnixCCompiler
    libraries lapack_atlas not found in /usr/lib/aarch64-linux-gnu
  customize UnixCCompiler
    libraries satlas,satlas not found in /usr/lib/aarch64-linux-gnu
  <class 'numpy.distutils.system_info.atlas_3_10_info'>
    NOT AVAILABLE
  
  atlas_threads_info:
  Setting PTATLAS=ATLAS
  customize UnixCCompiler
    libraries lapack_atlas not found in /usr/local/lib
  customize UnixCCompiler
    libraries ptf77blas,ptcblas,atlas not found in /usr/local/lib
  customize UnixCCompiler
    libraries lapack_atlas not found in /usr/lib
  customize UnixCCompiler
    libraries ptf77blas,ptcblas,atlas not found in /usr/lib
  customize UnixCCompiler
    libraries lapack_atlas not found in /usr/lib/aarch64-linux-gnu
  customize UnixCCompiler
    libraries ptf77blas,ptcblas,atlas not found in /usr/lib/aarch64-linux-gnu
  <class 'numpy.distutils.system_info.atlas_threads_info'>
    NOT AVAILABLE
  
  atlas_info:
  customize UnixCCompiler
    libraries lapack_atlas not found in /usr/local/lib
  customize UnixCCompiler
    libraries f77blas,cblas,atlas not found in /usr/local/lib
  customize UnixCCompiler
    libraries lapack_atlas not found in /usr/lib
  customize UnixCCompiler
    libraries f77blas,cblas,atlas not found in /usr/lib
  customize UnixCCompiler
    libraries lapack_atlas not found in /usr/lib/aarch64-linux-gnu
  customize UnixCCompiler
    libraries f77blas,cblas,atlas not found in /usr/lib/aarch64-linux-gnu
  <class 'numpy.distutils.system_info.atlas_info'>
    NOT AVAILABLE
  
  accelerate_info:
    NOT AVAILABLE
  
  /home/stefan/.local/lib/python3.6/site-packages/numpy/distutils/system_info.py:638: UserWarning:
      Atlas (http://math-atlas.sourceforge.net/) libraries not found.
      Directories to search for the libraries can be specified in the
      numpy/distutils/site.cfg file (section [atlas]) or by setting
      the ATLAS environment variable.
    self.calc_info()
  lapack_info:
  customize UnixCCompiler
    libraries lapack not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/aarch64-linux-gnu']
    NOT AVAILABLE
  
  /home/stefan/.local/lib/python3.6/site-packages/numpy/distutils/system_info.py:638: UserWarning:
      Lapack (http://www.netlib.org/lapack/) libraries not found.
      Directories to search for the libraries can be specified in the
      numpy/distutils/site.cfg file (section [lapack]) or by setting
      the LAPACK environment variable.
    self.calc_info()
  lapack_src_info:
    NOT AVAILABLE
  
  /home/stefan/.local/lib/python3.6/site-packages/numpy/distutils/system_info.py:638: UserWarning:
      Lapack (http://www.netlib.org/lapack/) sources not found.
      Directories to search for the sources can be specified in the
      numpy/distutils/site.cfg file (section [lapack_src]) or by setting
      the LAPACK_SRC environment variable.
    self.calc_info()
    NOT AVAILABLE
  
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/tmp/pip-build-lbg3d3lz/scipy/setup.py", line 492, in <module>
      setup_package()
    File "/tmp/pip-build-lbg3d3lz/scipy/setup.py", line 488, in setup_package
      setup(**metadata)
    File "/home/stefan/.local/lib/python3.6/site-packages/numpy/distutils/core.py", line 137, in setup
      config = configuration()
    File "/tmp/pip-build-lbg3d3lz/scipy/setup.py", line 395, in configuration
      raise NotFoundError(msg)
  numpy.distutils.system_info.NotFoundError: No lapack/blas resources found.
  
  ----------------------------------------
  Failed building wheel for scipy
  Running setup.py clean for scipy
  Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-lbg3d3lz/scipy/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" clean --all:
  
  `setup.py clean` is not supported, use one of the following instead:
  
    - `git clean -xdf` (cleans all files)
    - `git clean -Xdf` (cleans all versioned files, doesn't touch
                        files that aren't checked into the git repo)
  
  Add `--force` to your command to use it anyway if you must (unsupported).
  
  
  ----------------------------------------
  Failed cleaning build dir for scipy
Failed to build scipy
Installing collected packages: scipy
  Running setup.py install for scipy ... error
    Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-lbg3d3lz/scipy/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-d2i8f2ti-record/install-record.txt --single-version-externally-managed --compile --user --prefix=:
    
    Note: if you need reliable uninstall behavior, then install
    with pip instead of using `setup.py install`:
    
      - `pip install .`       (from a git repo or downloaded source
                               release)
      - `pip install scipy`   (last SciPy release on PyPI)
    
    
    Running from scipy source directory.
    lapack_opt_info:
    lapack_mkl_info:
    customize UnixCCompiler
      libraries mkl_rt not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/aarch64-linux-gnu']
      NOT AVAILABLE
    
    openblas_lapack_info:
    customize UnixCCompiler
    customize UnixCCompiler
      libraries openblas not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/aarch64-linux-gnu']
      NOT AVAILABLE
    
    openblas_clapack_info:
    customize UnixCCompiler
    customize UnixCCompiler
      libraries openblas,lapack not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/aarch64-linux-gnu']
      NOT AVAILABLE
    
    atlas_3_10_threads_info:
    Setting PTATLAS=ATLAS
    customize UnixCCompiler
      libraries lapack_atlas not found in /usr/local/lib
    customize UnixCCompiler
      libraries tatlas,tatlas not found in /usr/local/lib
    customize UnixCCompiler
      libraries lapack_atlas not found in /usr/lib
    customize UnixCCompiler
      libraries tatlas,tatlas not found in /usr/lib
    customize UnixCCompiler
      libraries lapack_atlas not found in /usr/lib/aarch64-linux-gnu
    customize UnixCCompiler
      libraries tatlas,tatlas not found in /usr/lib/aarch64-linux-gnu
    <class 'numpy.distutils.system_info.atlas_3_10_threads_info'>
      NOT AVAILABLE
    
    atlas_3_10_info:
    customize UnixCCompiler
      libraries lapack_atlas not found in /usr/local/lib
    customize UnixCCompiler
      libraries satlas,satlas not found in /usr/local/lib
    customize UnixCCompiler
      libraries lapack_atlas not found in /usr/lib
    customize UnixCCompiler
      libraries satlas,satlas not found in /usr/lib
    customize UnixCCompiler
      libraries lapack_atlas not found in /usr/lib/aarch64-linux-gnu
    customize UnixCCompiler
      libraries satlas,satlas not found in /usr/lib/aarch64-linux-gnu
    <class 'numpy.distutils.system_info.atlas_3_10_info'>
      NOT AVAILABLE
    
    atlas_threads_info:
    Setting PTATLAS=ATLAS
    customize UnixCCompiler
      libraries lapack_atlas not found in /usr/local/lib
    customize UnixCCompiler
      libraries ptf77blas,ptcblas,atlas not found in /usr/local/lib
    customize UnixCCompiler
      libraries lapack_atlas not found in /usr/lib
    customize UnixCCompiler
      libraries ptf77blas,ptcblas,atlas not found in /usr/lib
    customize UnixCCompiler
      libraries lapack_atlas not found in /usr/lib/aarch64-linux-gnu
    customize UnixCCompiler
      libraries ptf77blas,ptcblas,atlas not found in /usr/lib/aarch64-linux-gnu
    <class 'numpy.distutils.system_info.atlas_threads_info'>
      NOT AVAILABLE
    
    atlas_info:
    customize UnixCCompiler
      libraries lapack_atlas not found in /usr/local/lib
    customize UnixCCompiler
      libraries f77blas,cblas,atlas not found in /usr/local/lib
    customize UnixCCompiler
      libraries lapack_atlas not found in /usr/lib
    customize UnixCCompiler
      libraries f77blas,cblas,atlas not found in /usr/lib
    customize UnixCCompiler
      libraries lapack_atlas not found in /usr/lib/aarch64-linux-gnu
    customize UnixCCompiler
      libraries f77blas,cblas,atlas not found in /usr/lib/aarch64-linux-gnu
    <class 'numpy.distutils.system_info.atlas_info'>
      NOT AVAILABLE
    
    accelerate_info:
      NOT AVAILABLE
    
    /home/stefan/.local/lib/python3.6/site-packages/numpy/distutils/system_info.py:638: UserWarning:
        Atlas (http://math-atlas.sourceforge.net/) libraries not found.
        Directories to search for the libraries can be specified in the
        numpy/distutils/site.cfg file (section [atlas]) or by setting
        the ATLAS environment variable.
      self.calc_info()
    lapack_info:
    customize UnixCCompiler
      libraries lapack not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/aarch64-linux-gnu']
      NOT AVAILABLE
    
    /home/stefan/.local/lib/python3.6/site-packages/numpy/distutils/system_info.py:638: UserWarning:
        Lapack (http://www.netlib.org/lapack/) libraries not found.
        Directories to search for the libraries can be specified in the
        numpy/distutils/site.cfg file (section [lapack]) or by setting
        the LAPACK environment variable.
      self.calc_info()
    lapack_src_info:
      NOT AVAILABLE
    
    /home/stefan/.local/lib/python3.6/site-packages/numpy/distutils/system_info.py:638: UserWarning:
        Lapack (http://www.netlib.org/lapack/) sources not found.
        Directories to search for the sources can be specified in the
        numpy/distutils/site.cfg file (section [lapack_src]) or by setting
        the LAPACK_SRC environment variable.
      self.calc_info()
      NOT AVAILABLE
    
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-lbg3d3lz/scipy/setup.py", line 492, in <module>
        setup_package()
      File "/tmp/pip-build-lbg3d3lz/scipy/setup.py", line 488, in setup_package
        setup(**metadata)
      File "/home/stefan/.local/lib/python3.6/site-packages/numpy/distutils/core.py", line 137, in setup
        config = configuration()
      File "/tmp/pip-build-lbg3d3lz/scipy/setup.py", line 395, in configuration
        raise NotFoundError(msg)
    numpy.distutils.system_info.NotFoundError: No lapack/blas resources found.
    
    ----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-lbg3d3lz/scipy/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-d2i8f2ti-record/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-build-lbg3d3lz/scipy/

However, a system wide installation with

sudo apt-get install python3-scipy

makes it available

Hi

A missing library when compiling the scipy module:

numpy.distutils.system_info.NotFoundError: No lapack/blas resources found.

Please get the lapack/blas installed first.
https://devtalk.nvidia.com/default/topic/1049684/jetson-nano/errors-during-install-sklearn-/post/5327807/#5327807

Thanks.

1 Like