install.rst 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. ------------
  2. Installation
  3. ------------
  4. bcolz depends on NumPy and, optionally, Numexpr. Also, if you are
  5. going to install from sources, and a C compiler (Clang, GCC and MSVC
  6. 2008 for Python 2, and MSVC 2010 for Python 3, have been tested).
  7. Installing from PyPI repository
  8. ===============================
  9. Do::
  10. $ easy_install -U bcolz
  11. or::
  12. $ pip install -U bcolz
  13. Installing from conda-forge
  14. ===========================
  15. Binaries for Linux, Mac and Windows are available for installation via conda.
  16. Do::
  17. $ conda install -c conda-forge bcolz
  18. Installing Windows binaries
  19. ===========================
  20. Unofficial Windows binaries are provided by Christoph Gohlke and can be
  21. downloaded from:
  22. http://www.lfd.uci.edu/~gohlke/pythonlibs/#bcolz
  23. Using the Microsoft Python 2.7 Compiler
  24. =======================================
  25. As of Sept 2014 Microsoft has made a Visual C++ compiler for Python 2.7
  26. available for download:
  27. http://aka.ms/vcpython27
  28. This has been made available specifically to ease the handling of Python
  29. packages with C-extensions on Windows (installation and building wheels).
  30. It is possible to compile bcolz with this compiler (Jan 2015), however,
  31. you may need to use the following patch::
  32. diff --git i/setup.py w/setup.py
  33. index d77d37f233..b54bfd0fa1 100644
  34. --- i/setup.py
  35. +++ w/setup.py
  36. @@ -11,8 +11,8 @@ from __future__ import absolute_import
  37. import sys
  38. import os
  39. import glob
  40. -from distutils.core import Extension
  41. -from distutils.core import setup
  42. +from setuptools import Extension
  43. +from setuptools import setup
  44. import textwrap
  45. import re, platform
  46. Installing from tarball sources
  47. ===============================
  48. Go to the bcolz main directory and do the typical distutils dance::
  49. $ python setup.py build_ext --inplace
  50. In case you have Blosc installed as an external library you can link
  51. with it (disregarding the included Blosc sources) in a couple of ways:
  52. Using an environment variable::
  53. $ BLOSC_DIR=/usr/local (or "set BLOSC_DIR=\blosc" on Win)
  54. $ export BLOSC_DIR (not needed on Win)
  55. $ python setup.py build_ext --inplace
  56. Using a flag::
  57. $ python setup.py build_ext --inplace --blosc=/usr/local
  58. It is always nice to run the tests before installing the package::
  59. $ PYTHONPATH=. (or "set PYTHONPATH=." on Windows)
  60. $ export PYTHONPATH (not needed on Windows)
  61. $ python -c"import bcolz; bcolz.test()" # add `heavy=True` if desired
  62. And if everything runs fine, then install it via::
  63. $ python setup.py install
  64. Testing the installation
  65. ========================
  66. You can always test the installation from any directory with::
  67. $ python -c "import bcolz; bcolz.test()"