Opened 9 years ago

Last modified 3 years ago

#15 new defect

PyWavelets dependency difficult to satisfy

Reported by: flip Owned by:
Priority: major Milestone:
Component: install Version:
Keywords: Cc:

Description (last modified by flip)

Summary

Vespa depends on PyWavelets; Analysis uses it.

Installing PyWavelets is no problem on Windows, iffy on Linux, and definitely a problem under OSX.

Description

The problem is that PyWavelets' developer (it's a Bus Factor 1 project) provides prebuilt binaries only for Windows. He provides the source code so that it can be built on other platforms, but the build requires not only a C compiler, but also Cython.

Note that none of Vespa's other dependencies even require a C compiler, let alone Cython.

Some Linux users may still be able to get prebuilt binaries for their platform courtesy of their distribution's package manager. Ubuntu is a good example; it offers prebuilt PyWavelets 1.6 under Ubuntu >= 8.10 (which is from late 2008). Fedora 12 is a good counterexample; it was released in late 2009 but doesn't offer a prebuilt PyWavelets.

So, Linux users will be hit or miss depending on which distro they're running.

OS X users are flat out of luck unless they have installed Fink or MacPorts (3rd party, open source package managers for OS X). Typically, only developer types use Fink/MacPorts, so while they save time, they don't solve the PyWavelets problem for anyone who isn't already capable of solving it themselves.

And no, EPD doesn't include PyWavelets.

Resolution Suggestion 1

Make PyWavelets an optional dependency.

This definitely solves the installation problem, but leaves a bit of a hole in Vespa's functionality. Brian says that "[PyWavelets] is central to one of our (my) most used spectral fitting routines. You might even call it our signature algorithm."

Also, making it optional would require new code in a couple of places.

setup.py doesn't complain when optional dependencies are missing, but neither does it inform the user what features will be disabled due to the missing dependency. That feature would have to be added, but it's small and would probably be generally useful.

Also, Analysis would obviously have to test for the presence of PyWavelets and disable some features if it's not present. I don't know how realistic this is code-wise.

Resolution Suggestion 2

Provide precompiled binaries for Linux and OS X.

We only have a little experience with building binaries against various Pythons for use on machines other than our own, so I can't say whether or not it is realistic. It's certainly extra work, and a long-term maintenance item.

Feel free to add your own resolution suggestions. Mine don't seem very satisfying. =)

Change History (11)

comment:1 Changed 9 years ago by flip

  • Description modified (diff)

comment:2 Changed 9 years ago by flip

I asked on the PyWavelets group if it was possible to make the 1.6 binaries available and was ignored which I don't take as a good sign.

http://groups.google.com/group/pywavelets/browse_thread/thread/fb6754bc7b63082

comment:3 Changed 9 years ago by flip

  • Description modified (diff)

comment:4 Changed 9 years ago by flip

It seems increasingly like OS X is the odd one out here.

PyWavelets (sometimes called pywt) is provided by Fedora 13 & 14:
https://admin.fedoraproject.org/pkgdb/acls/name/python-pywt?_csrf_token=1aed47005190485fa5f1e64d2cfc9070e352981b

Ubuntu as old as 8.04 (the oldest I have installed) has PyWavelets.

So two of the most common desktop distros provide it.

comment:5 Changed 9 years ago by flip

As of today we have a new pywavelets-osx repos that contains a prebuilt PyWavelets 0.2.0 for use under OS X 10.6 with python.org's Python 2.6. I haven't made the repos public yet, though. That would have to be done before we can offer it as a solution.

comment:6 Changed 8 years ago by flip

Another thing to consider is PyWavelets support for Python 2.7. PyWavelets' best support is for Windows, but it doesn't yet offer Python 2.7 binaries for Windows. That means only lucky Linux users can get prebuilt PyWavelets binaries that are compatible with Python 2.7. Everyone else will have to stick with Python < 2.7 or build their own libraries.

comment:7 Changed 8 years ago by flip

We made the PyWavelets-OSX binaries available in May 2011.

There are still no PyWavelets Windows binaries for Python 2.7, so Windows users are stuck on Python <= 2.6.

comment:8 Changed 8 years ago by flip

Another wrinkle is that EPD (which does not provide PyWavelets) is on Python 2.7 as of EPD 7.0 (released Feb 2011). So Windows users w/EPD 7.x don't have a way to get PyWavelets either.

comment:9 Changed 8 years ago by flip

As of r3034, PyWavelets is optional even when running Analysis (although the
wavelet baseline filtering isn't available) so we have mitigated but not fixed the problem on our end.

comment:10 Changed 7 years ago by flip

As of September 2012, the author has released PyWavelets 0.2.2 with binaries for Python 2.7 under Windows. I have verified that this version of PyWavelets works with EPD 7.x.

Anyone who wants to use PyWavelets with Python 2.6 under Windows will have to stick with PyWavelets 0.2.0.

http://pypi.python.org/pypi/PyWavelets/0.2.0

http://pypi.python.org/pypi/PyWavelets/0.2.2

comment:11 Changed 3 years ago by flip

Python's packaging options have improved a great deal since this ticket was opened. We have released wheels for PyWavelets here:
https://scion.duhs.duke.edu/vespa/analysis/wiki/PyWaveletsOsx

It isn't ideal for the Vespa team to build these wheels, but it's better than the alternatives.

Note: See TracTickets for help on using tickets.