Installation

This guide walks you through installing and configuring the ViewAI Python SDK.

Prerequisites

Before installing the ViewAI SDK, ensure you have:

  • Python 3.8 or higher installed

  • pip package manager

  • Virtual environment (recommended)

  • ViewAI API key (get one at app.viewai.ca)

Check Python Version

python --version

# or
python3 --version

If you don't have Python 3.8+, download it from python.org.

Installation Methods

The easiest way to install the ViewAI SDK is from PyPI:

Method 2: Install from Source

For development or to use the latest features:

Method 3: Install with Optional Dependencies

For ONNX model support:

For development with all dependencies:

Virtual Environment Setup

Using conda

Verify Installation

After installation, verify everything is working:

Or run a quick test:

Dependencies

The SDK automatically installs the following required dependencies:

Core Dependencies

  • requests (>=2.28.0) - HTTP client

  • pandas (>=1.5.0) - Data manipulation

  • numpy (>=1.21.0) - Numerical computing

  • tqdm (>=4.64.0) - Progress bars

Optional Dependencies

  • scikit-learn (>=1.1.0) - Model training

  • onnxruntime - ONNX model inference

  • skl2onnx - Model export to ONNX

  • joblib - Model serialization

Configuration

Environment Variables

Set up your API key and configuration using environment variables:

Configuration File

Create a .env file in your project root:

Load it using python-dotenv:

Platform-Specific Instructions

Docker Installation

For containerized environments:

Dockerfile

docker-compose.yml

Jupyter Notebook Setup

For use in Jupyter notebooks:

In your notebook:

Google Colab Setup

For Google Colab:

Troubleshooting

Common Issues

ModuleNotFoundError: No module named 'viewai_client'

Solution: Ensure you've activated your virtual environment and installed the SDK:

ImportError: cannot import name 'ViewAIClient'

Solution: Check your Python version (must be 3.8+):

SSL Certificate errors

Solution: Update certifi:

Permission denied errors on Linux/macOS

Solution: Use user installation:

Dependency Conflicts

If you encounter dependency conflicts:

Network Issues

If installation fails due to network issues:

Upgrading

Upgrade to Latest Version

Upgrade to Specific Version

Check Installed Version

Uninstallation

To remove the ViewAI SDK:

Development Setup

For contributing to the SDK:

Next Steps

1

Get Your API Key

Visit app.viewai.ca to create an account and get your API key.

2

Quick Start Tutorial

Follow the Quick Start Guide to build your first model.

3

Authentication Setup

Learn about Authentication.

4

Core Concepts

Understand Core Concepts.

Additional Resources

Need Help? Contact us at [email protected] or visit our community forum.

Was this helpful?