Search code examples
pythonpython-3.xwaveletubuntupywt

How to install PyWavelets for Python 3 on Kubuntu 14.04?


I'm tryting to install PyWavelets on Kubuntu 14.04, but its not working...

Since we dont have python3-pywt (we have python-pwt, for python 2) on Ubuntu oficial repositories, I tried to install it with pip, so I did:

$ sudo pip3 install pywavelets

And I've got the error:

Downloading/unpacking pywavelets
  Downloading PyWavelets-0.2.2.zip (528kB): 528kB downloaded
  Running setup.py (path:/tmp/pip_build_root/pywavelets/setup.py) egg_info for package pywavelets
    Traceback (most recent call last):
      File "", line 17, in 
      File "/tmp/pip_build_root/pywavelets/setup.py", line 14, in 
        from util import commands
      File "/tmp/pip_build_root/pywavelets/util/commands.py", line 25, in 
        import templating
    ImportError: No module named 'templating'
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

  File "", line 17, in 

  File "/tmp/pip_build_root/pywavelets/setup.py", line 14, in 

    from util import commands

  File "/tmp/pip_build_root/pywavelets/util/commands.py", line 25, in 

    import templating

ImportError: No module named 'templating'

Any idea?


Solution

  • On Kubuntu 14.04 using Python 3.4, I installed the packages (for Python 3): python3-all-dev, and the respective ones related to numpy and Cython.

    Then I clonned the sorce from the github repo pywt repo. After that I was able to do:

    $ python setup.py install --user
    

    The build and install worked perfectly, so I tested if everythink was ok:

    $ python3
    >>> import pywt
    >>> pywt.test()
    . . .
    OK (SKIP=1)
    <nose.result.TextTestResult run=934 errors=0 failures=0>