Installing the SDK¶
Pre-requisites¶
To run the integrate.ai SDK samples and build models, ensure that your environment is configured properly.
Required software:
Pip 22.2 (or later)
Generate an access token¶
To install the SDK and other components locally, you must generate an access token through the workspace UI.
Log in to your workspace.
On the getting started page, click Generate.
Copy the acccess token and save it to a secure location.
Treat your API tokens like passwords and keep them secret. When working with the API, use the token as an environment variable instead of hardcoding it into your programs. In this documentation, the token is referenced as <IAI_TOKEN>.
Install integrate.ai packages¶
- We recommend installing the SDK inside a virtual environment using any of the following tools.
uv. If using uv, ensure that all the pip steps below have uv in front of it.
- At a command prompt on your machine, run the following commands to install the CLI management tool:
- Install the SDK package using the access token you generated.
pip install uv
pip install integrate-ai
iai sdk install --token <IAI_TOKEN>
Updating your SDK¶
Typically, each time integrate.ai releases a software update, you must update your local SDK installation. To check the SDK version, run iai sdk version.
You can compare the version against the feature release version in the Release Notes to ensure that your environment is up to date.
The command to update the SDK is the same as you used to install it initially.
iai sdk install --token <IAI_TOKEN>
Updating your local environment¶
When a new version of an integrate.ai package is released, follow these steps to update your local development environment.
Check version numbers¶
From a command prompt or terminal, use the pip show integrate-ai command to see the version of the integrate-ai command line interface (CLI).
To check the SDK version, run iai sdk version.
You can compare the version against the feature release version in the Release Notes to ensure that your environment is up to date.
Get the latest packages¶
Run the following command to update the CLI and all dependent packages.
pip install -U integrate-ai
Update the SDK:
iai sdk install
Debugging Installation Issues¶
When installing the SDK you may encounter the following known issues. Follow the steps below to resolve them.
- SSL Certificate Verification Error, typically appears as follows:
SSLError: HTTPSConnectionPool(host='integrateai.net', port=443): Max retries exceeded with url: /api/endpoint (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1006)')))
- Install Certifi inside the virtual environment:
pip install --upgrade certifi - Run the command below in the python shell to locate the Certifi CA bundle path. The output is a path similar to /path/to/certifi/cacert.pem.
import certifi print(certifi.where()) # Copy this path to use in below steps
- Set the Environment Variables:
Set the REQUESTS_CA_BUNDLE and SSL_CERT_FILE environment variables to the path of the certifi CA bundle. This process differs based on your operating system.
For Windows
Open Control Panel -> System and Security -> System -> Advanced system settings.
Click Environment Variables.
Under System variables, click New.
Add the two variables with the path obtained earlier.
`REQUESTS_CA_BUNDLE` with the value `C:\path\to\certifi\cacert.pem` (obtained above). `SSL_CERT_FILE` with the value `C:\path\to\certifi\cacert.pem` (obtained above).
Save
For MacOS / Linux
Open your terminal and set the environment variables:
export REQUESTS_CA_BUNDLE=/path/to/certifi/cacert.pem export SSL_CERT_FILE=/path/to/certifi/cacert.pem
To make this change permanent, add the export command to your shell configuration file (e.g., ~/.bashrc, ~/.bash_profile, ~/.zshrc):
echo 'export REQUESTS_CA_BUNDLE=/path/to/certifi/cacert.pem' >> ~/.bashrc echo 'export SSL_CERT_FILE=/path/to/certifi/cacert.pem' >> ~/.bashrc source ~/.bashrc
- The `pip-system-certs` library may also be required. To install the library:
pip install pip-system-certs - Install the SDK after these steps have been completed.
To resolve the SSL certificate issue: