How do you install the blaze module (Continuum analytics) in Python?

让人想犯罪 __ 提交于 2019-12-03 20:36:27

I didn't find any instructions anywhere online for this, but it's relatively straightforward.

About my platform/tools I used:

  • Mac OSX (Mountain Lion)
  • Python 2.7.3
  • homebrew
  • pip
  • It looks like you might need to install Cython, not sure as I already had it installed. You can do this with pip install Cython.

First, brew install llvm.

Here are the packages you need. You can pip all of them:

  • llvmpy
  • numba
  • meta
  • ply
  • blosc
  • sphinx -- for doc
  • aterm

Once you've pipped everything,

  • cd /tmp up to you, of course...
  • sudo git clone git@github.com:ContinuumIO/blaze-core.git
  • cd /tmp/blaze-core
  • sudo make build
  • sudo make docs
  • sudo python setup.py install (Whether you need sudo depends on where you git things to, of course.)

I've had trouble running the tests, it looks like there's an error in an __init__.py file somewhere, but I can't be for sure. I can't get the unit tests to run, so take "successful installation" with a grain of salt. At any rate, I can do a spot check to see that the module imports correctly:

>>> import blaze
>>> from blaze import Array, dshape
>>> ds=dshape('2,2,int')
>>> a = Array([1,2,3,4],ds)
>>> a
Array
  datashape := 2, 2, int 
  values    := [CArray(ptr=140454075688080)] 
  metadata  := [manifest, arraylike] 
  layout    := Chunked(dim=0) 
[1 2 3 4]
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!