Installing Lapack On Mac Os X



The Mac binaries are built on OS X 10.5.8. Prepare your system by installing required dependencies. For a RHEL 6.3 system, these can be obtained from the Yum repositories by executing the command. The Mac binaries are built on OS X 10.5.8. Prepare your system by installing required dependencies. For a RHEL 6.3 system, these can be obtained from the Yum repositories by executing the command. Jun 07, 2013 @rgommers i'm quite sure this isn't a dup of that, i'm running on mac os x and afaik it uses Accelerate.framework in LAPACK. Also i seem to judge the severity of this a bit different: Many of my researcher colleagues use macs and all of whom I asked to run the scipy test were surprised that these tests fail. Sep 06, 2019 Install macOS or OS X from Internet Recovery Mode, which you can boot into by holding option+command+R while your Mac powers up. Download the relevant macOS or OS X installer from Apple, then use Terminal to create a USB installer you can boot up from.

Binary installers¶

Type ppm install Math-Lapack Perl 5.8 Perl 5.10 Perl 5.12 Perl 5.14 Perl 5.16 Perl 5.18. Mac OS X: n/a n/a.

In most use cases the best way to install NumPy on your system is by using aninstallable binary package for your operating system.

Windows¶

Good solutions for Windows are, Enthought Canopy (which provides binaryinstallers for Windows, OS X and Linux) and Python (x, y). Both of these packages include Python, NumPy andmany additional packages.

A lightweight alternative is to download the Pythoninstaller from www.python.org and the NumPyinstaller for your Python version from the Sourceforge download site

The NumPy installer includes binaries for different CPU’s (without SSEinstructions, with SSE2 or with SSE3) and installs the correct oneautomatically. If needed, this can be bypassed from the command line with

or ‘sse2’ or ‘sse3’ instead of ‘nosse’.

Linux¶

Most of the major distributions provide packages for NumPy, but these can lagbehind the most recent NumPy release. Pre-built binary packages for Ubuntu areavailable on the scipy ppa. Redhat binaries areavailable in the Enthought Canopy.

Mac OS X¶

A universal binary installer for NumPy is available from the download site. The Enthought Canopy provides NumPy binaries.

Building from source¶

A general overview of building NumPy from source is given here, with detailedinstructions for specific platforms given seperately.

Lapack

Prerequisites¶

Building NumPy requires the following software installed:

  1. Python 2.4.x, 2.5.x or 2.6.x

    On Debian and derivative (Ubuntu): python, python-dev

    On Windows: the official python installer atwww.python.org is enough

    Make sure that the Python package distutils is installed beforecontinuing. For example, in Debian GNU/Linux, distutils is includedin the python-dev package.

    Python must also be compiled with the zlib module enabled.

  2. Compilers

    To build any extension modules for Python, you’ll need a C compiler.Various NumPy modules use FORTRAN 77 libraries, so you’ll also need aFORTRAN 77 compiler installed.

    Note that NumPy is developed mainly using GNU compilers. Compilers fromother vendors such as Intel, Absoft, Sun, NAG, Compaq, Vast, Porland,Lahey, HP, IBM, Microsoft are only supported in the form of communityfeedback, and may not work out of the box. GCC 3.x (and later) compilersare recommended.

  3. Linear Algebra libraries

    NumPy does not require any external linear algebra libraries to beinstalled. However, if these are available, NumPy’s setup script can detectthem and use them for building. A number of different LAPACK library setupscan be used, including optimized LAPACK libraries such as ATLAS, MKL or theAccelerate/vecLib framework on OS X.

FORTRAN ABI mismatch¶

The two most popular open source fortran compilers are g77 and gfortran.Unfortunately, they are not ABI compatible, which means that concretely youshould avoid mixing libraries built with one with another. In particular, ifyour blas/lapack/atlas is built with g77, you must use g77 when buildingnumpy and scipy; on the contrary, if your atlas is built with gfortran, youmust build numpy/scipy with gfortran. This applies for most other caseswhere different FORTRAN compilers might have been used.

Choosing the fortran compiler¶

To build with g77:

To build with gfortran:

For more information see:

How to check the ABI of blas/lapack/atlas¶

One relatively simple and reliable way to check for the compiler used to builda library is to use ldd on the library. If libg2c.so is a dependency, thismeans that g77 has been used. If libgfortran.so is a a dependency, gfortranhas been used. If both are dependencies, this means both have been used, whichis almost always a very bad idea.

Download

Disabling ATLAS and other accelerated libraries¶

Usage of ATLAS and other accelerated libraries in Numpy can be disabledvia:

Supplying additional compiler flags¶

Additional compiler flags can be supplied by setting the OPT,FOPT (for Fortran), and CC environment variables.

Building with ATLAS support¶

Ubuntu 8.10 (Intrepid) and 9.04 (Jaunty)¶

You can install the necessary packages for optimized ATLAS with this command:

If you have a recent CPU with SIMD suppport (SSE, SSE2, etc...), you shouldalso install the corresponding package for optimal performances. For example,for SSE2:

This package is not available on amd64 platforms.

NOTE: Ubuntu changed its default fortran compiler from g77 in Hardy togfortran in Intrepid. If you are building ATLAS from source and are upgradingfrom Hardy to Intrepid or later versions, you should rebuild everything fromscratch, including lapack.

Ubuntu 8.04 and lower¶

You can install the necessary packages for optimized ATLAS with this command:

If you have a recent CPU with SIMD suppport (SSE, SSE2, etc...), you shouldalso install the corresponding package for optimal performances. For example,for SSE2:

Windows¶

Here is a step-by-step guide to installing CVXPY on a Windows machine.

  1. If you have Python installed already, it’s probably a good idea to remove it first. (Sorry!)
  2. Download the latest version of Python(x,y).
  3. Install Python(x,y). When prompted to select optional components, make sure to check cvxopt and MinGW, as shown below.
  1. We need to set the default compiler as mingw32. Open Notepad and type the following, save the file at C:Python27Libdistutilsdistutils.cfg. (This is the default location. If you installed Python somewhere else, use the appropriate location.)
  1. Open Python(x,y) and launch the interactive console (highlighted button in the picture). This will bring up a console.
  1. From the console, run “pip install ecos” to install ecos.
  2. We need to install BLAS and LAPACK libraries, and make the scs package use them. Go here to download the win32 version of the dll and lib files of both BLAS and LAPACK. Put them under some directory, say C:blaslapack, as shown below.
  1. The system needs to know where to find the libraries. Right click on This PC (or My Computer), click Properties, Advanced system settings, then Environment Variables. Under the System variables list, find a variable named Path, and press Edit. Then, at the end of the list, put the address to the directory where you put the library files. All paths must be separated by semicolons.
  1. Download the SCS package as a zip file and unzip it.
  2. Browse to scs-master directory, and edit line 48 of the file scs.mk to “USE_LAPACK = 1”. Without this, scs won’t be able to solve SDPs.

Installing Lapack On Mac Os X 10 11 Download Free

  1. Browse to the src directory, and open the file cones.c. Edit lines 11 and 13 to look like the following.

Installing Lapack On Mac Os X 10.10

  1. We have to change the numpy settings so that it knows where to find the libraries. Open C:Python27Libsite-packagesnumpydistutilssite.cfg and add the following lines to the end of the file:

You can remove what’s already in there, and replace the file with just the six lines above.

  1. Go back to the Python(x,y) terminal, and browse to the python directory of scs-master. From there, type “python setup.py build” to build scs. (If this step results in some error, remove the build directory and try again.) After the build is successful, run “python setup.py install” to install.
  2. After scs is installed, run “pip install cvxpy” to install CVXPY.
  3. Reboot your computer so that the path environment variable we set in step 8 takes effect.
  4. CVXPY should work now. You can use the Spyder IDE from the Python(x,y) home window. Click on the Spyder button to launch it. This IDE allows you to code, run, and view the console all in the same window. In order to check if the installation was successful, open a terminal, browse to C:Python27Libsite-packagescvxpy, and run “nosetests tests”. This runs all unit tests and reports any error found.