Prerequisites
Note: As of MapR 5.2.1, you can create Python client applications for HPE Ezmeral Data Fabric Event Store.
Verify that the
following components are installed on the node:
- HPE Ezmeral Data Fabric Event Store C Client (mapr-librdkafka)
- GNU Compiler Collection (GCC) is installed on the node.
- Python version 2.7.1 and above, up to Python version 3.6.x.
- Python pip
- python-devel (This is required for nodes with the Linux operating
system.)
Important: Because the
HPE Ezmeral Data Fabric Event Store Python Client is dependent on the
HPE Ezmeral Data Fabric Event Store
C Client, you must configure the
HPE Ezmeral Data Fabric Event Store C Client before using the
HPE Ezmeral Data Fabric Event Store
Python Client. See
Configuring the HPE Ezmeral Data Fabric Event Store C Client.
Installation
Note: The Python client is available for Linux or Mac operating systems.
To install the
HPE Ezmeral Data Fabric Event Store Python Client using the
Python Software Foundation, run the following command as
root or using
sudo:
- On Linux:
pip install --global-option=build_ext --global-option="--library-dirs=/opt/mapr/lib" --global-option="--include-dirs=/opt/mapr/include/" mapr-streams-python
- On
Mac:
pip install --user --global-option=build_ext --global-option="--library-dirs=/opt/mapr/lib" --global-option="--include-dirs=/opt/mapr/include/" mapr-streams-python
Note: The referenced package works on nodes with the Linux or the Mac operating
system. The Python Client for HPE Ezmeral Data Fabric Event Store is not supported on Windows.
Alternatively, you can install the
HPE Ezmeral Data Fabric Event Store Python Client via the MapR package repository:
https://package.mapr.com/releases/MEP/<MEP version>/mac/mapr-streams-python-<version>.tar.gz
Troubleshooting Mac OS Installation
If you install the
HPE Ezmeral Data Fabric Event Store Python Client on a Mac without the
--user flag, you
may encounter a "Not Permitted" error, signifying that you don't have permission to
create a LICENSE file. The error will look similar to the
following:
Copying LICENSE -> /System/Library/Frameworks/Python.framework/Versions/2.7/
error: [Error 1] Operation not permitted:
'/System/Library/Frameworks/Python.framework/Versions/2.7/LICENSE'
To fix this issue, execute the following steps. These steps apply to users with a new
Mac OS Sierra version 10.12.5.
- Reboot your Mac while simultaneously holding the Command and R
keys to go into Mac OS X Recovery mode.
- Select Utilities, and then Terminal.
- Type
csrutil disable. A message will pop up, informing you
that your System Integrity Protection (SIP) has been sucessfully
disabled.
- Reboot your Mac again.
- Go into the Terminal and execute the following command as the
root
user:pip install --global-option=build_ext --global-option="--library-dirs=/opt/mapr/lib" --global-option="--include-dirs=/opt/mapr/include/" mapr-streams-python
- Once the script runs successfully, reboot your Mac while holding the
Command and R keys. You will go into Mac OS X Recovery
mode.
- Select Utilities, and then Terminal.
- Type
csruntil enable to enable your SIP.
Note: To avoid this error, consider using a virtual Python environment or the
--user flag.