3 Replies Latest reply on Mar 8, 2016 12:31 PM by BrechtW

    How to install scipy?

    BrechtW

      I tried installing scipy (numpy is installed by default). I'm using the eglibc.

       

      1) pip install

      root@galileo:/media/card# pip install scipy
      Collecting scipy
      /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_                                                                                                             .py:315: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject                                                                                                              Name Indication) extension to TLS is not available on this platform. This may c                                                                                                             ause the server to present an incorrect TLS certificate, which can cause validat                                                                                                             ion failures. For more information, see https://urllib3.readthedocs.org/en/lates                                                                                                             t/security.html#snimissingwarning.
        SNIMissingWarning
      /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_                                                                                                             .py:120: InsecurePlatformWarning: A true SSLContext object is not available. Thi                                                                                                             s prevents urllib3 from configuring SSL appropriately and may cause certain SSL                                                                                                              connections to fail. For more information, see https://urllib3.readthedocs.org/e                                                                                                             n/latest/security.html#insecureplatformwarning.
        InsecurePlatformWarning
        Downloading scipy-0.17.0.tar.gz (12.4MB)
          100% |################################| 12.4MB 1.0kB/s
      Building wheels for collected packages: scipy
        Running setup.py bdist_wheel for scipy ... error
        Complete output from command /usr/bin/python -u -c "import setuptools, tokeniz                                                                                                             e;__file__='/tmp/pip-build-cULFeC/scipy/setup.py';exec(compile(getattr(tokenize,                                                                                                              'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist                                                                                                             _wheel -d /tmp/tmpMx25pMpip-wheel- --python-tag cp27:
        Traceback (most recent call last):
          File "<string>", line 1, in <module>
          File "/tmp/pip-build-cULFeC/scipy/setup.py", line 265, in <module>
            setup_package()
          File "/tmp/pip-build-cULFeC/scipy/setup.py", line 262, in setup_package
            setup(**metadata)
          File "/usr/lib/python2.7/site-packages/numpy/distutils/core.py", line 143, i                                                                                                             n setup
            dist = setup(**new_attr)
          File "/usr/lib/python2.7/site-packages/numpy/distutils/core.py", line 186, i                                                                                                             n setup
            return old_setup(**new_attr)
          File "/usr/lib/python2.7/distutils/core.py", line 138, in setup
            ok = dist.parse_command_line()
          File "/usr/lib/python2.7/site-packages/distribute-0.6.32-py2.7.egg/setuptool                                                                                                             s/dist.py", line 232, in parse_command_line
            result = _Distribution.parse_command_line(self)
          File "/usr/lib/python2.7/distutils/dist.py", line 467, in parse_command_line
            args = self._parse_command_opts(parser, args)
          File "/usr/lib/python2.7/site-packages/distribute-0.6.32-py2.7.egg/setuptool                                                                                                             s/dist.py", line 558, in _parse_command_opts
            nargs = _Distribution._parse_command_opts(self, parser, args)
          File "/usr/lib/python2.7/distutils/dist.py", line 523, in _parse_command_opt                                                                                                             s
            cmd_class = self.get_command_class(command)
          File "/usr/lib/python2.7/site-packages/distribute-0.6.32-py2.7.egg/setuptool                                                                                                             s/dist.py", line 362, in get_command_class
            ep.require(installer=self.fetch_build_egg)
          File "/usr/lib/python2.7/site-packages/distribute-0.6.32-py2.7.egg/pkg_resou                                                                                                             rces.py", line 2029, in require
            working_set.resolve(self.dist.requires(self.extras),env,installer))
          File "/usr/lib/python2.7/site-packages/distribute-0.6.32-py2.7.egg/pkg_resou                                                                                                             rces.py", line 2239, in requires
            dm = self._dep_map
          File "/usr/lib/python2.7/site-packages/distribute-0.6.32-py2.7.egg/pkg_resou                                                                                                             rces.py", line 2468, in _dep_map
            self.__dep_map = self._compute_dependencies()
          File "/usr/lib/python2.7/site-packages/distribute-0.6.32-py2.7.egg/pkg_resou                                                                                                             rces.py", line 2501, in _compute_dependencies
            common = frozenset(reqs_for_extra(None))
          File "/usr/lib/python2.7/site-packages/distribute-0.6.32-py2.7.egg/pkg_resou                                                                                                             rces.py", line 2498, in reqs_for_extra
            if req.marker_fn(override={'extra':extra}):
          File "/usr/lib/python2.7/site-packages/distribute-0.6.32-py2.7.egg/_markerli                                                                                                             b/markers.py", line 100, in marker_fn
            return eval(compiled_marker, environment)
          File "<environment marker>", line 1, in <module>
        NameError: name 'sys_platform' is not defined
      
      
        ----------------------------------------
        Failed building wheel for scipy
        Running setup.py clean for scipy
      Failed to build scipy
      Installing collected packages: scipy
        Running setup.py install for scipy ... error
          Complete output from command /usr/bin/python -u -c "import setuptools, token                                                                                                             ize;__file__='/tmp/pip-build-cULFeC/scipy/setup.py';exec(compile(getattr(tokeniz                                                                                                             e, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" ins                                                                                                             tall --record /tmp/pip-ospSEq-record/install-record.txt --single-version-externa                                                                                                             lly-managed --compile:
          lapack_opt_info:
          lapack_mkl_info:
          mkl_info:
            libraries mkl,vml,guide not found in ['/usr/lib']
            NOT AVAILABLE
      
      
            NOT AVAILABLE
      
      
          atlas_threads_info:
          Setting PTATLAS=ATLAS
            libraries ptf77blas,ptcblas,atlas not found in /usr/lib
            libraries lapack_atlas not found in /usr/lib
          numpy.distutils.system_info.atlas_threads_info
            NOT AVAILABLE
      
      
          atlas_info:
            libraries f77blas,cblas,atlas not found in /usr/lib
            libraries lapack_atlas not found in /usr/lib
          numpy.distutils.system_info.atlas_info
            NOT AVAILABLE
      
      
          /usr/lib/python2.7/site-packages/numpy/distutils/system_info.py:1379: UserWa                                                                                                             rning:
              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.
            warnings.warn(AtlasNotFoundError.__doc__)
          lapack_info:
            libraries lapack not found in ['/usr/lib']
            NOT AVAILABLE
      
      
          /usr/lib/python2.7/site-packages/numpy/distutils/system_info.py:1390: UserWa                                                                                                             rning:
              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.
            warnings.warn(LapackNotFoundError.__doc__)
          lapack_src_info:
            NOT AVAILABLE
      
      
          /usr/lib/python2.7/site-packages/numpy/distutils/system_info.py:1393: UserWa                                                                                                             rning:
              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.
            warnings.warn(LapackSrcNotFoundError.__doc__)
            NOT AVAILABLE
      
      
          Running from scipy source directory.
          Traceback (most recent call last):
            File "<string>", line 1, in <module>
            File "/tmp/pip-build-cULFeC/scipy/setup.py", line 265, in <module>
              setup_package()
            File "/tmp/pip-build-cULFeC/scipy/setup.py", line 262, in setup_package
              setup(**metadata)
            File "/usr/lib/python2.7/site-packages/numpy/distutils/core.py", line 152,                                                                                                              in setup
              config = configuration()
            File "/tmp/pip-build-cULFeC/scipy/setup.py", line 182, in configuration
              config.add_subpackage('scipy')
            File "/usr/lib/python2.7/site-packages/numpy/distutils/misc_util.py", line                                                                                                              1003, in add_subpackage
              caller_level = 2)
            File "/usr/lib/python2.7/site-packages/numpy/distutils/misc_util.py", line                                                                                                              972, in get_subpackage
              caller_level = caller_level + 1)
            File "/usr/lib/python2.7/site-packages/numpy/distutils/misc_util.py", line                                                                                                              909, in _get_configuration_from_setup_py
              config = setup_module.configuration(*args)
            File "scipy/setup.py", line 15, in configuration
              config.add_subpackage('linalg')
            File "/usr/lib/python2.7/site-packages/numpy/distutils/misc_util.py", line                                                                                                              1003, in add_subpackage
              caller_level = 2)
            File "/usr/lib/python2.7/site-packages/numpy/distutils/misc_util.py", line                                                                                                              972, in get_subpackage
              caller_level = caller_level + 1)
            File "/usr/lib/python2.7/site-packages/numpy/distutils/misc_util.py", line                                                                                                              909, in _get_configuration_from_setup_py
              config = setup_module.configuration(*args)
            File "scipy/linalg/setup.py", line 20, in configuration
              raise NotFoundError('no lapack/blas resources found')
          numpy.distutils.system_info.NotFoundError: no lapack/blas resources found
      
      
          ----------------------------------------
      Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-b                                                                                                             uild-cULFeC/scipy/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file_                                                                                                             _).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-o                                                                                                             spSEq-record/install-record.txt --single-version-externally-managed --compile" f                                                                                                             ailed with error code 1 in /tmp/pip-build-cULFeC/scipy
      /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_                                                                                                             .py:120: InsecurePlatformWarning: A true SSLContext object is not available. Thi                                                                                                             s prevents urllib3 from configuring SSL appropriately and may cause certain SSL                                                                                                              connections to fail. For more information, see https://urllib3.readthedocs.org/e                                                                                                             n/latest/security.html#insecureplatformwarning.
        InsecurePlatformWarning
      You are using pip version 8.0.2, however version 8.1.0 is available.
      You should consider upgrading via the 'pip install --upgrade pip' command.
      root@galileo:/media/card#
      
      
      
      
      
      
      

       

      2) opkg install

      root@galileo:/media/card# opkg install scipy
      Unknown package 'scipy'.
      Collected errors:
      * opkg_install_cmd: Cannot install package scipy.
      root@galileo:/media/card#
      
      
      
      
      
      
      

      3) pip install git+

      EDIT: I also tried the following:

      root@galileo:/media/card# pip install git+https://github.com/scipy/scipy.git
      Collecting git+https://github.com/scipy/scipy.git
        Cloning https://github.com/scipy/scipy.git to /tmp/pip-65Cyms-build
        Complete output from command git submodule update --init --recursive -q:
        git: 'submodule' is not a git command. See 'git --help'.
      
      
        ----------------------------------------
      Command "git submodule update --init --recursive -q" failed with error code 1 in /tmp/pip-65Cyms-build
      You are using pip version 8.0.2, however version 8.1.0 is available.
      You should consider upgrading via the 'pip install --upgrade pip' command.
      root@galileo:/media/card#
      
      
      
      
      
      

      4) pip install BLAS(Atlas) and gfortran

      EDIT2: followed this tutorial to get scipy working on intel edison. I got the following error:

      ATLAS/tune/blas/gemm/CASES/ATL_mm4x4x8_bpfabc.c
      ATLAS/tune/blas/gemm/CASES/ATL_mm4x4x8p.c
      ATLAS/tune/blas/gemm/CASES/ATL_mm6x8x8_1p.c
      ATLAS/tune/blas/gemm/CASES/ATL_mm8x8x2.c
      ATLAS/tune/blas/gemm/CASES/ATL_objdummy.c
      ATLAS/tune/blas/gemm/CASES/ATL_smm10x1x120_sse.c
      ATLAS/tune/blas/gemm/CASES/ATL_smm14x1x84_sse.c
      ATLAS/tune/blas/gemm/CASES/ATL_smm14x1x84_sseCU.c
      ATLAS/tune/blas/gemm/CASES/ATL_smm2x2x256_sse.c
      ATLAS/tune/blas/gemm/CASES/ATL_smm2x4x256_fma4.c
      ATLAS/tune/blas/gemm/CASES/ATL_smm4x1x256_sse.c
      ATLAS/tune/blas/gemm/CASES/ATL_smm4x1x60_4_sse2.c
      ATLAS/tune/blas/gemm/CASES/ATL_smm4x2x256_avx.c
      ATLAS/tune/blas/gemm/CASES/ATL_smm4x2x8_avx.c
      ATLAS/tune/blas/gemm/CASES/ATL_smm4x4x128_av.c
      tar: write error: No space left on device
      root@galileo:/media/card# ^C
      root@galileo:/media/card#
      
      
      
      
      

       

      5) miniconda (tutorial)

      
      
      root@galileo:/# opkg install tar
      Unknown package 'tar'.
      Collected errors:
      * opkg_install_cmd: Cannot install package tar.
      root@galileo:/#
      
      

       

      How do I install tar?

       

      Miniconda3 will now be installed into this location:
      /home/root/miniconda3
      
      
        - Press ENTER to confirm the location
        - Press CTRL-C to abort the installation
        - Or specify a different location below
      
      
      [/home/root/miniconda3] >>>
      PREFIX=/home/root/miniconda3
      tar: unrecognized option '--no-same-owner'
      BusyBox v1.22.1 (2015-09-29 22:18:03 GMT) multi-call binary.
      
      
      Usage: tar -[cxtzJjahvO] [-X FILE] [-T FILE] [-f TARFILE] [-C DIR] [FILE]...
      
      
      ERROR: could not extract tar starting at line 370
      root@galileo:/#
      
      

       

      How do you install scipy the right way on an Intel Galileo Gen 2?