Hi, On Fri, Sep 17, 2010 at 12:07 PM, j wade <wade.jer...@gmail.com> wrote: > I would like to use PyWavelets (http://www.pybytes.com/pywavelets/) in > Sage. > > I am running Sage 4.3.4 on Ubuntu 9.10. > > I have installed python-pywt using Synaptic File Manager, but I am not > sure what to do beyond this. I have refreshed the libraries, and > tried > > import scipy > from scipy import pywt > > and > > import scipy > import pywt > > but neither command recognizes pywt.
The above steps failed because by default Sage doesn't recognize Python packages that you have installed system-wide. That is, the package manager Synaptic installs packages system-wide, whereas the packages (including Python ones) in Sage are installed specifically under the SAGE_ROOT top-level directory. So when you issued import pywt from within a Sage session, Sage couldn't find pywt because PyWavelets was not installed under a place where Sage would by default recognize. > If someone out there is using pywavelets with Sage, I'd appreciate it > if you could let me know how you were able to get it to work. Here are the steps that should allow you to install and use PyWavelets from within Sage. (1) Download a source release of PyWavelets from http://pypi.python.org/pypi/PyWavelets/. I downloaded PyWavelets-0.2.0.tar.bz2 and uncompressed it. (2) Get the absolute path to your local Sage installation. In my case, it's /dev/shm/mvngu/sage-4.5.3 (3) Navigate to the top-level directory of the uncompressed PyWavelets package and install it: $ cd /path/to/PyWavelets-0.2.0/ $ /dev/shm/mvngu/sage-4.5.3/sage -python setup.py install <installation messages> (4) Load Sage and start using PyWavelets: $ /dev/shm/mvngu/sage-4.5.3/sage ---------------------------------------------------------------------- | Sage Version 4.5.3, Release Date: 2010-09-04 | | Type notebook() for the GUI, and license() for information. | ---------------------------------------------------------------------- sage: import pywt sage: pywt.families() ['haar', 'db', 'sym', 'coif', 'bior', 'rbio', 'dmey'] sage: w = pywt.Wavelet('db3') sage: print w Wavelet db3 Family name: Daubechies Short name: db Filters length: 6 Orthogonal: True Biorthogonal: True Symmetry: asymmetric -- Regards Minh Van Nguyen -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org