SDK Installation
This guide will help you install the OptixLog SDK and its dependencies.
Prerequisites
Before installing OptixLog SDK, ensure you have:
- Python 3.8 or higher (Python 3.9+ recommended)
- pip (Python package manager, usually comes with Python)
- Internet connection (for downloading packages)
Check Your Python Version
python --version
# or
python3 --versionYou should see Python 3.8 or higher. If not, download Python first.
Check pip
pip --version
# or
pip3 --versionIf pip is not installed, install it:
python -m ensurepip --upgradeBasic Installation
The simplest way to install OptixLog SDK:
pip install http://optixlog.com/optixlog-0.0.4-py3-none-any.whlOr if you need to use pip3:
pip3 install http://optixlog.com/optixlog-0.0.4-py3-none-any.whlThis installs the core SDK with all required dependencies.
Optional Dependencies
OptixLog SDK supports optional dependencies for extended functionality:
MPI Support
For MPI parallel simulations, install with MPI support:
pip install http://optixlog.com/optixlog-0.0.4-py3-none-any.whl
# Then install mpi4py separately if needed:
pip install mpi4pyThis installs mpi4py which enables:
- Automatic MPI environment detection
- Master/worker process coordination
- MPI synchronization methods
Note: You still need an MPI implementation installed on your system (OpenMPI, Intel MPI, etc.).
Meep Integration
For better integration with Meep FDTD simulator:
pip install http://optixlog.com/optixlog-0.0.4-py3-none-any.whl
# Meep should be installed separately via your system package managerThis ensures compatibility with Meep’s MPI detection and field extraction.
Full Installation
Install all optional dependencies at once:
pip install http://optixlog.com/optixlog-0.0.4-py3-none-any.whl
# Install optional dependencies separately:
pip install mpi4py # For MPI support
# Meep should be installed via system package managerInstallation Methods
Using pip (Recommended)
# Basic installation
pip install http://optixlog.com/optixlog-0.0.4-py3-none-any.whl
# Install optional dependencies separately if needed:
pip install mpi4py # For MPI supportFrom Source
If you need to install from source:
git clone https://github.com/yourusername/optixlog-sdk.git
cd optixlog-sdk
pip install -e .In Virtual Environment (Recommended)
It’s recommended to use a virtual environment to avoid conflicts:
# Create virtual environment
python -m venv optixlog-env
# Activate it
# On Linux/macOS:
source optixlog-env/bin/activate
# On Windows:
optixlog-env\Scripts\activate
# Install OptixLog
pip install http://optixlog.com/optixlog-0.0.4-py3-none-any.whlVerification
After installation, verify that OptixLog is installed correctly:
Check Installation
python -c "import optixlog; print(optixlog.__version__)"You should see the version number (e.g., 0.0.3).
Test Import
import optixlog
print(f"OptixLog version: {optixlog.__version__}")Quick Functionality Test
import optixlog
# Check if MPI is available
mpi_info = optixlog.get_mpi_info()
print(f"MPI detected: {mpi_info[3] is not None}")
print(f"Is master process: {optixlog.is_master_process()}")Common Installation Issues
Issue: “pip: command not found”
Solution: Install pip or use python -m pip instead:
python -m pip install http://optixlog.com/optixlog-0.0.4-py3-none-any.whlIssue: Permission Denied
Solution: Use --user flag or a virtual environment:
pip install --user http://optixlog.com/optixlog-0.0.4-py3-none-any.whlOr create a virtual environment (recommended).
Issue: MPI Support Not Working
Symptoms: mpi4py not found or MPI detection fails
Solutions:
-
Install mpi4py separately:
pip install mpi4py -
Install MPI implementation first:
- Linux:
sudo apt-get install libopenmpi-dev openmpi-bin(Ubuntu/Debian) - macOS:
brew install open-mpi - Windows: Install Microsoft MPI
- Linux:
-
Check MPI installation:
mpirun --version
Issue: Import Errors
Symptoms: ModuleNotFoundError when importing optixlog
Solutions:
-
Verify installation:
pip show optixlog -
Reinstall:
pip uninstall optixlog pip install http://optixlog.com/optixlog-0.0.4-py3-none-any.whl -
Check Python version:
python --version # Should be 3.8+
Issue: SSL Certificate Errors
Symptoms: SSL errors when connecting to API
Solutions:
-
Update certificates:
pip install --upgrade certifi -
Check system certificates (Linux):
sudo apt-get update sudo apt-get install ca-certificates
Issue: Conflicting Dependencies
Symptoms: Dependency conflicts during installation
Solutions:
-
Use virtual environment (recommended):
python -m venv venv source venv/bin/activate # or venv\Scripts\activate on Windows pip install http://optixlog.com/optixlog-0.0.4-py3-none-any.whl -
Upgrade pip:
pip install --upgrade pip pip install http://optixlog.com/optixlog-0.0.4-py3-none-any.whl
Upgrading
To upgrade to the latest version:
pip install --upgrade http://optixlog.com/optixlog-0.0.4-py3-none-any.whlTo upgrade with optional dependencies:
pip install --upgrade http://optixlog.com/optixlog-0.0.4-py3-none-any.whlUninstalling
To remove OptixLog SDK:
pip uninstall optixlogNext Steps
Now that you have OptixLog installed: