Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

scipy install on mountain lion failing

Tags:

macos

pip

scipy

When I try to install scipy using pip install scipy it fails with the following traceback

Downloading/unpacking scipy
  Downloading scipy-0.10.1.tar.gz (6.2MB): 6.2MB downloaded
  Running setup.py egg_info for package scipy
    Running from scipy source directory.
    blas_opt_info:
      FOUND:
        extra_link_args = ['-Wl,-framework', '-Wl,Accelerate']
        define_macros = [('NO_ATLAS_INFO', 3)]
        extra_compile_args = ['-msse3', '-I/System/Library/Frameworks/vecLib.framework/Headers']

    non-existing path in '/private/var/folders/rd/fplkflh93ls54kbl5ylphl4h0000gn/T/pip-build/scipy/scipy/io': 'docs'
    lapack_opt_info:
      FOUND:
        extra_link_args = ['-Wl,-framework', '-Wl,Accelerate']
        define_macros = [('NO_ATLAS_INFO', 3)]
        extra_compile_args = ['-msse3']

    umfpack_info:
      libraries umfpack not found in /usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib
      libraries umfpack not found in /usr/local/lib
      libraries umfpack not found in /usr/lib
    /usr/local/lib/python2.7/site-packages/numpy/distutils/system_info.py:470: UserWarning:
        UMFPACK sparse solver (http://www.cise.ufl.edu/research/sparse/umfpack/)
        not found. Directories to search for the libraries can be specified in the
        numpy/distutils/site.cfg file (section [umfpack]) or by setting
        the UMFPACK environment variable.
      warnings.warn(self.notfounderror.__doc__)
      NOT AVAILABLE

    Traceback (most recent call last):
      File "<string>", line 16, in <module>
      File "/var/folders/rd/fplkflh93ls54kbl5ylphl4h0000gn/T/pip-build/scipy/setup.py", line 196, in <module>
        setup_package()
      File "/var/folders/rd/fplkflh93ls54kbl5ylphl4h0000gn/T/pip-build/scipy/setup.py", line 187, in setup_package
        configuration=configuration )
      File "/usr/local/lib/python2.7/site-packages/numpy/distutils/core.py", line 152, in setup
        config = configuration()
      File "/var/folders/rd/fplkflh93ls54kbl5ylphl4h0000gn/T/pip-build/scipy/setup.py", line 138, in configuration
        config.add_subpackage('scipy')
      File "/usr/local/lib/python2.7/site-packages/numpy/distutils/misc_util.py", line 1002, in add_subpackage
        caller_level = 2)
      File "/usr/local/lib/python2.7/site-packages/numpy/distutils/misc_util.py", line 971, in get_subpackage
        caller_level = caller_level + 1)
      File "/usr/local/lib/python2.7/site-packages/numpy/distutils/misc_util.py", line 908, in _get_configuration_from_setup_py
        config = setup_module.configuration(*args)
      File "scipy/setup.py", line 20, in configuration
        config.add_subpackage('special')
      File "/usr/local/lib/python2.7/site-packages/numpy/distutils/misc_util.py", line 1002, in add_subpackage
        caller_level = 2)
      File "/usr/local/lib/python2.7/site-packages/numpy/distutils/misc_util.py", line 971, in get_subpackage
        caller_level = caller_level + 1)
      File "/usr/local/lib/python2.7/site-packages/numpy/distutils/misc_util.py", line 908, in _get_configuration_from_setup_py
        config = setup_module.configuration(*args)
      File "/private/var/folders/rd/fplkflh93ls54kbl5ylphl4h0000gn/T/pip-build/scipy/scipy/special/setup.py", line 54, in configuration
        extra_info=get_info("npymath")
      File "/usr/local/lib/python2.7/site-packages/numpy/distutils/misc_util.py", line 2220, in get_info
        pkg_info = get_pkg_info(pkgname, dirs)
      File "/usr/local/lib/python2.7/site-packages/numpy/distutils/misc_util.py", line 2172, in get_pkg_info
        return read_config(pkgname, dirs)
      File "/usr/local/lib/python2.7/site-packages/numpy/distutils/npy_pkg_config.py", line 390, in read_config
        v = _read_config_imp(pkg_to_filename(pkgname), dirs)
      File "/usr/local/lib/python2.7/site-packages/numpy/distutils/npy_pkg_config.py", line 326, in _read_config_imp
        meta, vars, sections, reqs = _read_config(filenames)
      File "/usr/local/lib/python2.7/site-packages/numpy/distutils/npy_pkg_config.py", line 309, in _read_config
        meta, vars, sections, reqs = parse_config(f, dirs)
      File "/usr/local/lib/python2.7/site-packages/numpy/distutils/npy_pkg_config.py", line 281, in parse_config
        raise PkgNotFound("Could not find file(s) %s" % str(filenames))
    numpy.distutils.npy_pkg_config.PkgNotFound: Could not find file(s) ['/usr/local/lib/python2.7/site-packages/numpy/core/lib/npy-pkg-config/npymath.ini']

I'm using Mountain Lion, and python 2.7.3 which I installed using homebrew, and numpy was installed using pip install numpy.

Why is the scipy install failing?

like image 976
2daaa Avatar asked Sep 25 '12 00:09

2daaa


2 Answers

This seems to be an issue with pip and numpy, which doesn't copy the compiled libraries into the site-packages directory.

You could install using pip into a virtualenv (which worked for me) or install from source using the

python setup.py install

method.

There are some comments about issue here:

http://www.thisisthegreenroom.com/2011/installing-python-numpy-scipy-matplotlib-and-ipython-on-lion/

like image 50
Chris Avatar answered Oct 15 '22 03:10

Chris


if you use homebrew, you can try the following (thanks to https://github.com/pypa/pip/issues/707):

brew tap samueljohn/homebrew-python
brew install numpy
brew install scipy
like image 21
Loki Avatar answered Oct 15 '22 02:10

Loki