Ensure you have a recent version of
pip install --upgrade pip
Then install the latest version of PyKX with the following command:
pip install --extra-index-url=https://$KX_PYPI_USER:$KX_PYPI_PASS@nexus.dl.kx.com/repository/pykx/simple/ pykx
To install a specific version of PyKX run the following command replacing
<INSERT_VERSION> with a specific released semver version of the interface
pip install --extra-index-url=https://$KX_PYPI_USER:$KX_PYPI_PASS@nexus.dl.kx.com/repository/pykx/simple/ pykx==<INSERT_VERSION>
To get access to both a
KX_PYPI_PASS set of credentials to allow you install PyKX, please email email@example.com.
Python packages should typically be installed in a virtual environment. This can be done with the venv package from the standard library.
KX only officially supports versions of PyKX built by KX, i.e. versions of PyKX installed from wheel files. Support for user-built installations of PyKX (e.g. built from the source distribution) is only provided on a best-effort basis. Currently, PyKX provides wheels for the following environments:
- Linux (
manylinux_2_17_x86_64) with CPython 3.7-3.10
- macOS (
macosx_10_10_x86_64) with CPython 3.7-3.10
- Windows (
win_amd64) with CPython 3.7-3.10
PyKX depends on the following third-party Python packages:
For python versions >= 3.8
For python version 3.7
They are installed automatically by
pip when PyKX is installed.
PyKX also has an optional Python dependency of
pyarrow>=3.0.0, which can be included by installing the
pyarrow extra, e.g.
pip install pykx[pyarrow]
Trying to use the
pa conversion methods of
pykx.K objects or the
pykx.toq.from_arrow method when PyArrow is not installed (or could not be imported without error) will raise a
Optional Non-Python Dependencies
libsslfor TLS on IPC connections.
To run q or PyKX on Windows,
msvcr100.dll must be installed. It is included in the Microsoft Visual C++ 2010 Redistributable.
Licensing code execution for PyKX
To run q code within PyKX an appropriate q license is required.
This license must be a
kx.lic file provided by KX and located within a users specified
$QLIC directory. The
insights.lib.pykx feature flags must also be enabled. You can check what feature flags you have by starting q, then running
" " vs .z.l 4 - this will provide a list of the enabled feature flags for your license. If you do not have an appropriate license it will not be possible to execute q code within the Python session directly, all interactions with q in this case should be conducted via IPC communication with an external q/kdb+ server.
If you do not have access to an appropriate license or wish to trial PyKX in your organisation contact firstname.lastname@example.org.