gabrielelanaro / chemview

The new generation molecular viewer for IPython notebook
GNU Lesser General Public License v2.1
81 stars 17 forks source link

Optional requirement for numba/jit #13

Closed ben-albrecht closed 9 years ago

ben-albrecht commented 9 years ago

I use chemview on several machines within several virtual environments. Consequently, I have to install chemview and its dependencies frequently. Being a non-Anaconda user, I've found it is a pain to get chemview installed each time for several reasons:

  1. The setup.py does not attempt to install the dependencies or warn about missing dependencies. Rather, you find out that dependencies are missing upon runtime.
  2. Numba, which depends on llvmlite, which depends on llvm 3.5 being installed in the correct location (which is not the case for Ubuntu), and lib-edit-dev (not installed by default).
  3. A given version of Numba will only work with a small specific set of llvmlite versions.

I suggest making the usage of Numba optional, i.e. something like this:

try:
    import numba as nb
except ImportError:
    print("WARNING: Not using Numba JIT compiler, marching cubes algorithm significantly slower", file=sys.stderr)

This may reduce the activation barrier for new users who are not using Anaconda and want to try chemview.

gabrielelanaro commented 9 years ago

That makes sense as numba is not used a lot anyway. Thanks for the input, I'll fix this by the end of the week.