1.0 Installing
Edit meBefore you can use the Python Application API, you must complete the following tasks:
- 
    
Install IBM Streams Version 4.0.1 (or later) or IBM Streams Quick Start Edition Version 4.0.1 (or later):
 - 
    
Ensure that you configure the IBM Streams product environment variable by entering the following command:
source product-installation-root-directory/4.n.n.n/bin/streamsprofile.shTip: Add the source command to your
home-directory/.bashrcshell initialization file. Otherwise, you must enter the command every time you start IBM Streams. For example, if the product is installed in the/home/streamsadmin/InfoSphere_Streams/4.2.0.0directory, add the following line to your.bashrcfile:source /home/streamsadmin/InfoSphere_Streams/4.2.0.0/bin/streamsprofile.sh - 
    
Download the IBM Streams Topology toolkit, which includes the Python Application API. You can download the most recent version of the toolkit from the IBMStreams organization on GitHub from the streamsx.topology Releases page. If you are using IBM Streams 4.2 or later then this step is optional as the toolkit is included at
$STREAMS_INSTALL/toolkits/com.ibm.streamsx.topology.After the toolkit downloads, extract it to your file system.
 - 
    
Install a supported version of Python. The Python Application API has been tested with Python 3.5.1. You can choose from one of these options:
- 
        
Recommended - Anaconda 4.0.0 or later, which includes Python 3.5.0 https://www.continuum.io/downloads.
 - 
        
CPython 3.5.0 or later https://www.python.org.
If building Python from source, remember to pass
--enable-sharedas a parameter toconfigure. After installation, setLD_LIBRARY_PATHtoPython_Install>/lib. 
To build IBM Streams application bundles with the Python Application API that can be submitted to your Bluemix Streaming Analytics service you must:
- use Anaconda 4.1.1 (Python 3.5 version) or later
 - install Anaconda at 
/disk1/opt/Anaconda3on the machine where you execute the Python code that builds the topology and submits it to theBUNDLEcontext 
 - 
        
 - 
    
Include the fully qualified path of the
com.ibm.streamsx.topology/opt/python/packagesdirectory in the PYTHONPATH environment variable. For example:export PYTHONPATH=/home/myuser/download/com.ibm.streamsx.topology/opt/python/packages:$PYTHONPATH