[SciPy-user] SciPy builds and installs but won't import due to f2c

Frank Lagor dfranci@seas.upenn....
Wed Jul 23 17:39:19 CDT 2008


 Honestly, I don't know.  Here is a tip though that caused me a problem with
numpy and scipy installs and I just want to make sure you are aware of it.
Maybe it will help...

Sometimes when you execute the step "python setup.py build" when you have
been trying a bunch of different things, it does not rebuild the files as
you want it to.  So that when you do "python setup.py install" it is not
installing code that was built with the options you wanted.  To avoid this
pitful, EVERY time you try to install execute:
python setup.py clean
and,
rm -rf build  (This removes the old build directory)

Perhaps that was helpful... :(
Good Luck,
Frank

On Wed, Jul 23, 2008 at 6:21 PM, Selwyn-Lloyd McPherson <
smcphers@stanford.edu> wrote:

> Unfortunately, scipy doesn't seem to want to build without LAPACK -- I've
> tried lots of different LAPACK distributions. I've tried using ATLAS with
> LAPACK and ATLAS without LAPACK (built LAPACK standalone) with lots of
> different flags but nothing seems to work. I've tried rebuilding the f2c
> libraries but it still comes up with the "undefined symbol" MAIN__ error.
> I've read here<http://www.velocityreviews.com/forums/t332246-using-fortran-libraries-from-python.html> that
> inserting a
> int MAIN__( )
> { return(0);
> }
>
> in the codebase somewhere might fix the problem but I'm not sure where it
> could go.
>
> Is there any reason that scipy / lapack needs f2c? Can't it just use f2py?
>
> Selwyn-Lloyd
>
>
>
> On Jul 23, 2008, at 6:58 Antemeridian, Frank Lagor wrote:
>
> Dear Selwyn-Lloyd,
>
> I hope I can help some, but I am not at all an expert on these things.  I
> had what seemed like a similar problem (VERY similar, if I can remember).
> Here's what got me running-- my numpy installation was based on the lapack
> version that was causing my problem (I don't know if it was a lapack or
> scipy problem but whatever...) Anyways, I re-did the install of numpy, and I
> did not specify what lapack to use in the install.  I you want to do this,
> be very careful that you do not have a LAPACK environment variable which is
> pointing somewhere and you don't know it.  If you do, just unset it (unset
> LAPACK).  The numpy install should not find any LAPACK (you'll be able to
> read that on the screen during install), and it will use some default one.
> Then re-do the scipy install and it should work.  This is sort of a hack
> fix, because you will be using a non-optimized version of Lapack (assuming
> you wanted to use ATLAS or something), but it will get you running.  One
> last thing, unfortunately I believe the default version of lapack installed
> is lapack lite or something like that (not the full lapack).  This may cause
> you to not have full functionality.  It has only caused me problems on one
> function: interp2d for 2d interpolation.  Also, you are on Red Hat, why
> don't you use some red hat package manager or builtin software to install
> this stuff?
>
> That's all I've got,
> Frank
>
> On Wed, Jul 23, 2008 at 3:07 AM, Selwyn-Lloyd McPherson <
> smcphers@stanford.edu> wrote:
>
>> Hi everyone,
>>
>> I've been working on getting SciPy installed on my machine and it
>> seems almost there. I've got a x86_64 system running Red Hat and more
>> or less followed
>> http://www.scipy.org/Installing_SciPy/Linux#head-1c4018a51422706809ee96a4db03ca0669f5f6d1
>>  to build and install SciPy. After dealing with the whole fPIC mess
>> that the 64-bit processor requires the install seems to finish but
>> when I try to import, I get:
>>
>>  >>> from scipy import *
>> Traceback (most recent call last):
>>   File "<stdin>", line 1, in ?
>>   File "/usr/lib64/python2.4/site-packages/scipy/linalg/__init__.py",
>> line 8, in ?
>>     from basic import *
>>   File "/usr/lib64/python2.4/site-packages/scipy/linalg/basic.py",
>> line 17, in ?
>>     from lapack import get_lapack_funcs
>>   File "/usr/lib64/python2.4/site-packages/scipy/linalg/lapack.py",
>> line 17, in ?
>>     from scipy.linalg import flapack
>> ImportError: /usr/lib/libf2c.so.0: undefined symbol: MAIN__
>>
>>
>> Apparently a problem with f2c. . . Have any ideas?
>>
>> Thanks so much for reading!
>>
>>
>> Selwyn-Lloyd
>> _______________________________________________
>> SciPy-user mailing list
>> SciPy-user@scipy.org
>> http://projects.scipy.org/mailman/listinfo/scipy-user
>>
>
>
>
> --
> Frank Lagor
> Ph.D. Candidate
> Mechanical Engineering and Applied Mechanics
> University of Pennsylvania
> dfranci@seas.upenn.edu
> 215.898.3144
> _______________________________________________
> SciPy-user mailing list
> SciPy-user@scipy.org
> http://projects.scipy.org/mailman/listinfo/scipy-user
>
>
>
> _______________________________________________
> SciPy-user mailing list
> SciPy-user@scipy.org
> http://projects.scipy.org/mailman/listinfo/scipy-user
>
>


-- 
Frank Lagor
Ph.D. Candidate
Mechanical Engineering and Applied Mechanics
University of Pennsylvania
dfranci@seas.upenn.edu
215.898.3144
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/scipy-user/attachments/20080723/ff10ff90/attachment.html 


More information about the SciPy-user mailing list