Python
Build dependencies:
- Numpy
- Cython
- C++17 compiler
- CMake
Runtime Dependencies
- Numpy
macOS / Linux
Windows
Simply execute the following commands:
$ git clone https://github.com/TileDB-Inc/TileDB-Py.git
$ cd TileDB-Py
$ pip install -r requirements_dev.txt
$ python setup.py install
$ cd .. # exit the source directory to avoid import errors
If you wish to use a custom version of the TileDB library and it is installed in a non-standard location, pass the path to
setup.py
with the --tiledb=
flag. If you want to pass extra compiler/linker flags during the C++ extension compilation step use --cxxflags=
or --lflags=
.$ python setup.py install --tiledb=/home/tiledb/dist
To build against
libtiledb
installed with conda, run:# After activating the desired conda environment
$ conda install tiledb
$ python setup.py install --tiledb=$CONDA_PREFIX
To test your local installation, install optional dependencies, and then use
pytest
:$ pip install -r misc/requirements_test.txt
$ python -m pytest -v # in the TileDB-Py source directory
If TileDB is installed in a non-standard location, you also need to make the dynamic linker aware of
libtiledb
's location. Otherwise when importing the tiledb
module you will get an error that the built extension module cannot find libtiledb
's symbols:$ env LD_LIBRARY_PATH="/home/tiledb/dist/lib:$LD_LIBRARY_PATH" python -m pytest -v
For macOS the linker environment variable is
DYLD_LIBRARY_PATH
.If you are building the extension on Windows, first install a Python distribution such as Miniconda. You can then either build TileDB from source, or download the pre-built binaries.
Once you've installed Miniconda and TileDB, execute:
> cd TileDB-Py
> conda install conda-build
> pip install -r requirements_dev.txt
REM with a conda install of libtiledb:
> python setup.py install --tiledb=%CONDA_PREFIX%
REM with a TileDB source build:
> python setup.py install --tiledb=C:/path/to/TileDB/
> set PATH=%PATH%;C:/path/to/TileDB/dist/bin
REM to run tests:
> pip install -r misc/requirements_test.txt
> python -m pytest -v
Note that if you built TileDB from source, then replace
--tiledb=C:/path/to/TileDB
with --tiledb=C:/path/to/TileDB/dist
.Last modified 9mo ago