[SciPy-user] RPM building trouble

Pearu Peterson pearu at scipy.org
Mon Oct 4 10:40:09 CDT 2004

On Mon, 4 Oct 2004, Michael Reimpell wrote:

> There are some troubles building rpm packages:
> With the scipy CVS (2004-10-03) version,
> "python setup.py bdist_rpm --fix-python"
> fails, because the file "scipy_base/_compiled_base.c" contains
> two includes (e.g. _scipy_mapping.c), that do not handle the path correctly
> (therefore _scipy_mapping.c is not found).

Fixed in scipy CVS. Try

   python setup.py sdist -f bdist_rpm --fix-python

in scipy_core directory.

> With the SciPy_complete-0.3.tar.gz version,
> "python setup.py bdist_rpm --fix-python"
> fails, because SciPy_complete-0.3/scipy_core/setup.py is missing.

You shouldn't use SciPy_complete tar-ball to build rpms. See below.

> Also, in order to build a rpm package from scipy CVS, the scipy_distutils rpm
> has to be installed, but this package confilcts with the scipy rpm itself,
> afterwards.


In short, try the following
1) Install scipy_core needed by F2PY:
    cd cvs/scipy/scipy_core
    python setup.py sdist -f bdist_rpm --fix-python
    # install scipy_core rpm found in dist/ or
    # in build/bdist.linux-i686/rpm/RPMS/i386
2) Install F2PY needed to build scipy.
3) cd cvs/scipy
    #mv scipy_core scipy_core.hide # I had to do this in a redhat box
                                   # where distutils fails on bdist_rpm :(
    python setup.py sdist_packagers -f bdist_rpm --fix-python
    # install scipy rpm found in sdist or build/bdist.linux-i686/rpm/RPMS/i386

> Also, recent versions of f2py fail completely building rpms with
> "python setup.py bdits_rpm --fix-python", because of path problems in setup.py
> (complains about missing 'src'-directory). This is a known issue at least
> since F2PY-2.39.235_1693.

Hmm, just tried building F2PY-2.43.239_1835 rpms in Red Hat Linux release 
9 (Shrike) and had no problems. So, try the latest version of F2PY.

> After installing scipy I stumbled across the following issues:
> Following the plotting tutorial on
> "http://www.scipy.org/documentation/plottutorial.html",
> I had to use gui_thread.start(use_main=1) instead of gui_thread.start(). Also
> plt.title('some text') fails with:
> "Traceback (most recent call last):
>  File "<stdin>", line 1, in ?
>  File "/usr/lib/python2.3/site-packages/scipy/plt/interface.py", line 144, in
> title
>    _active.title.text = name
> AttributeError: 'instancemethod' object has no attribute 'text'".
> In general plotting seems to be a bit unstable: sometimes no window appears at
> first, but it works after restarting python and trying again.

When use_main=1 then old hooks of gui_thread are used and these are 
unsupported. Try with gui_thread.start() and report any problems to this
list. Of cource, it is assumed that you are using CVS version of scipy.

I also get attribute error on plt.title('some text')...

> I also had a problem with the linalg module:
> linalg.norm(A,'fro') fails with
> "Traceback (most recent call last):
>  File "<stdin>", line 1, in ?
>  File "/usr/lib/python2.3/site-packages/scipy/linalg/basic.py", line 273, in
> norm
>    val = real((conjugate(x)*x).flat)
> NameError: global name 'real' is not defined",
> but linalg.norm(A,2) works without problems.

This is fixed in scipy CVS now.

Thanks for feedback,

More information about the SciPy-user mailing list