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 --versionIf you don't have Python 3.8+, download it from python.org.
Installation Methods
Method 1: Install from PyPI (Recommended)
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 venv (Recommended)
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
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
Get Your API Key
Visit app.viewai.ca to create an account and get your API key.
Additional Resources
Need Help? Contact us at [email protected] or visit our community forum.
Was this helpful?