[AstroPy] OSX issues with the location of gfortran

Jim Ramberg ramberg at yahoo.com
Wed Jul 30 16:44:30 EDT 2014


Just some clarifications: I am using homebrew ( which is becoming more and
more popular) as my package manager under Mavericks .

So
himeko:astropy ramberg$ brew  install gfortran
Error: No available formula for gfortran
GNU Fortran is now provided as part of GCC, and can be installed with:
  brew install gcc


Other people reported the same issue on stackflow and the solution is to
re-install scipy so it can compile the binaries using the correct version
of gfortran. From what I was reading; it sounds like some libraries were
checked in that shouldn't have been.


The net result being all passed :


platform darwin -- Python 2.7.8 -- pytest-2.5.1

Running tests with Astropy version 1.0.dev9525.
Running tests in astropy /Users/ramberg/astropy/docs.

Platform: Darwin-13.3.0-x86_64-i386-64bit

Executable: /usr/local/opt/python/bin/python2.7

Full Python Version:
2.7.8 (default, Jul 30 2014, 08:54:34)
[GCC 4.2.1 Compatible Apple LLVM 5.1 (clang-503.0.40)]

encodings: sys: ascii, locale: UTF-8, filesystem: utf-8, unicode bits: 15
byteorder: little
float info: dig: 15, mant_dig: 15

Numpy: 1.8.1
Scipy: 0.14.0
Matplotlib: 1.3.1
h5py: 2.3.1


=============== 7747 passed, 121 skipped, 12 xfailed, 3 xpassed in 786.28
seconds ================


Thanks for the fast response time.


Jim



On 7/30/14, 7:30 AM, "Derek Homeier" <derek at astro.physik.uni-goettingen.de>
wrote:

> On 30 Jul 2014, at 04:14 pm, Jim Ramberg <ramberg at yahoo.com> wrote:
> 
>> Recent  releases of OSX has gfortran being moved to the gcc package.  So
>> astropy tests that have a preset path for gfortran are failing
>> 
>> Here is one of the errors I see:
>> 
>> /Users/ramberg/astropy/docs/convolution/kernels.rst:304: UnexpectedException
>> __________________________________________________________________________
>> [doctest] index.rst
>> __________________________________________________________________________
>> 023 Hubble constant at z=0 (i.e., ``H0``), and the number of transverse
>> proper
>> 024 kpc corresponding to an arcminute at z=3::
>> 025 
>> 026   >>> from astropy.cosmology import WMAP9 as cosmo
>> 027   >>> cosmo.H(0)  # doctest: +FLOAT_CMP
>> 028   <Quantity 69.32 km / (Mpc s)>
>> 029 
>> 030 .. doctest-requires:: scipy
>> 031 
>> 032   >>> cosmo.kpc_proper_per_arcmin(3)  # doctest: +FLOAT_CMP
>> UNEXPECTED EXCEPTION:
>> ImportError('dlopen(/usr/local/lib/python2.7/site-packages/scipy/special/_ufu
>> ncs.so, 2): Library not loaded:
>> /usr/local/Cellar/gfortran/4.8.1/gfortran/lib/libgfortran.3.dylib\n
>> Referenced from:
>> /usr/local/lib/python2.7/site-packages/scipy/special/_ufuncs.so\n  Reason:
>> image not found',)
>> Traceback (most recent call last):
>> 
>> 
>> 
>> I was wondering if there is a workaround for this or should I just create a
>> symlink 
>> The correct location on my system is:
>> /usr/local/Cellar/gcc/4.8.3_1/lib/gcc/x86_64-apple-darwin13.2.0/4.8.3/i386/li
>> bgfortran.3.dylib
> 
> There is no gfortran included with the system-provided gcc (which is actually
> clang/LLVM),
> so it¹s location depends on whatever additional gcc installation you are
> using, not on the
> OS X version - yours seems to be a rather exotic one. So the gfortran path
> should probably
> have been set at compile time of your astropy or scipy installation, wherever
> it found the
> working gfortran installation during 'setup.py build¹.
> Creating the symlink might work around this, but a better solution would
> probably be to rebuild
> your scipy installation to make it aware of the changed gfortran paths (and
> build against the
> installed version, gcc-4.8.3, whereas yours apparently had originally been
> built agains 4.8.1).
> 
> HTH,
> Derek
> 
> _______________________________________________
> AstroPy mailing list
> AstroPy at scipy.org
> http://mail.scipy.org/mailman/listinfo/astropy





More information about the AstroPy mailing list