[Numpy-discussion] scipy error undefined symbol: lsame_

David david@silveregg.co...
Tue Apr 20 05:16:19 CDT 2010

On 04/20/2010 02:32 AM, gerardob wrote:
> I installed scipy (and all the required libraries) and the following error
> appears when i tried run a simple example which uses the optimize package of
> scipy. I tried also numpy alone and it works ( at least for printing
> numpy.array([10,20,10]))
> error:
> Traceback (most recent call last):
>    File "main_test.py", line 2, in<module>
>      from scipy import optimize
>    File
> "/home/gberbeglia/python/Python-2.6.5/lib/python2.6/site-packages/scipy/optimize/__init__.py",
> line 11, in<module>
>      from lbfgsb import fmin_l_bfgs_b
>    File
> "/home/gberbeglia/python/Python-2.6.5/lib/python2.6/site-packages/scipy/optimize/lbfgsb.py",
> line 30, in<module>
>      import _lbfgsb
> ImportError:
> /home/gberbeglia/python/Python-2.6.5/lib/python2.6/site-packages/scipy/optimize/_lbfgsb.so:
> undefined symbol: lsame_
> gberbeglia@actarus:~/python/mycodes>

You did not build scipy properly: you need to make sure that everything 
is built with exactly the same fortran compiler. One way to check this 
is to do ldd on the .so files which fail: if you see g2c as a 
dependency, it is using g77, if you see libgfortran, it is using gfortran.



More information about the NumPy-Discussion mailing list