There's a fundamental compatibility challenge when integrating PyAEDT with ADS:
| Tool | Python Version | Notes |
|---|---|---|
| PyAEDT | 3.7+ (prefer 3.8+) | Modern Python required |
| ADS 2020 | 3.6 or 2.7 | Older Python bundled |
| ADS 2021 | 3.6 | Limited support |
| ADS 2022 | 3.7 | Better compatibility |
| ADS 2023+ | 3.8+ | Full compatibility ✓ |
- ADS Python API is tied to the Python version bundled with ADS installation
- PyAEDT requires modern Python (3.7+, preferably 3.8+)
- Older ADS versions (pre-2022) use Python 3.6 or even 2.7
- You cannot mix different Python versions in the same environment
We provide THREE approaches depending on your ADS version:
Use separate Python environments - PyAEDT and ADS run independently, communicate via files.
┌─────────────────────┐ ┌─────────────────────┐
│ PyAEDT Environment │ │ ADS Environment │
│ (Python 3.8+) │ │ (ADS bundled Py) │
│ │ │ │
│ - Extract HFSS │ │ - Import S2P │
│ - Export .s2p │────────▶│ - Run simulations │
│ - Generate data │ Files │ - Create testbench │
└─────────────────────┘ └─────────────────────┘
# Create PyAEDT environment
python3.9 -m venv venv_pyaedt
source venv_pyaedt/bin/activate
pip install -r requirements_pyaedt.txt# Use ADS bundled Python
/opt/keysight/ads2023/python/bin/python -m pip install -r requirements_ads.txt# Step 1: Extract from HFSS (PyAEDT environment)
source venv_pyaedt/bin/activate
python scripts/extract_from_hfss.py --project antenna.aedt --output antenna.s2p
# Step 2: Import to ADS (ADS environment)
/opt/keysight/ads2023/python/bin/python scripts/import_to_ads.py --file antenna.s2p✓ Works with any ADS version
✓ No version conflicts
✓ Easy to debug
✓ Industry standard approach
If you have ADS 2023 or later, it includes Python 3.8+, which is compatible with PyAEDT.
# Check ADS Python version
/opt/keysight/ads2023/python/bin/python --version
# Should show Python 3.8 or higher# Use ADS Python for everything
export ADS_PYTHON=/opt/keysight/ads2023/python/bin/python
$ADS_PYTHON -m pip install pyaedt numpy pandas scikit-rf# Single environment - both PyAEDT and ADS work!
from pyaedt import Hfss
from ads_automation import ADSController
# Extract from HFSS
hfss = Hfss("project.aedt")
hfss.export_touchstone("output.s2p")
# Import to ADS
ads = ADSController()
ads.import_s_parameters("output.s2p")✓ Single environment
✓ Simpler code
✓ Direct integration
Use files as the integration point - No direct API calls between tools.
HFSS/Maxwell → Export Files → ADS
↓ ↓
PyAEDT .s2p Manual/Script
Scripting .csv Import
.mat
# extract_data.py
from pyaedt import Hfss
hfss = Hfss("project.aedt")
hfss.export_touchstone("output.s2p")
print("Exported to output.s2p")# import_data.py - Run with ADS Python
import os
# Use ADS API (if available) or manual import
ads_workspace = "/path/to/workspace"
os.system(f"cp output.s2p {ads_workspace}/data/")
print("Import to ADS workspace data folder")- Run PyAEDT script to generate .s2p files
- Manually import to ADS via GUI or copy to workspace
✓ Works with any ADS version (even 2020, 2019)
✓ No Python version issues
✓ Simple and reliable
✓ Easy for team collaboration
This framework is designed to support all three solutions:
requirements_pyaedt.txt # For PyAEDT environment (Python 3.8+)
requirements_ads.txt # For ADS environment (ADS Python)
requirements.txt # Full set (if compatible)pyaedt_integration/ # Can run standalone
├── hfss_extractor.py
└── data_converter.py
ads_automation/ # Can run standalone
├── data_importer.py
└── testbench_generator.py
Our workflows are designed to work via files:
# Step 1: PyAEDT (Python 3.9)
from pyaedt_integration import HFSSDataExtractor
extractor = HFSSDataExtractor("project.aedt")
extractor.export_touchstone("component.s2p")
# Step 2: ADS (ADS Python - separate process/environment)
from ads_automation import ADSDataImporter
importer = ADSDataImporter("workspace")
importer.import_s_parameters("component.s2p")# Use ADS Python (3.8+) for everything
pip install -r requirements.txt
# Single environment works!# Check Python version first
/opt/keysight/ads2022/python/bin/python --version
# If 3.7+:
pip install -r requirements.txt
# If older:
# Use Solution 1 (Decoupled)# Use Solution 1 (Decoupled Architecture)
# Separate PyAEDT and ADS environments# Use Solution 3 (File-Based)
# PyAEDT extracts data to files
# Manually import to ADS or use basic file copyRun this script to check your environment:
# check_compatibility.py
import sys
import subprocess
print("Python Version Check")
print("=" * 60)
print(f"Current Python: {sys.version}")
print(f"Version: {sys.version_info.major}.{sys.version_info.minor}")
# Check if PyAEDT compatible
pyaedt_ok = sys.version_info >= (3, 7)
print(f"PyAEDT Compatible: {'✓ Yes' if pyaedt_ok else '✗ No (need 3.7+)'}")
# Try to find ADS
ads_paths = [
"/opt/keysight/ads2023/python/bin/python",
"/opt/keysight/ads2022/python/bin/python",
"C:\\Program Files\\Keysight\\ADS2023\\python\\python.exe"
]
print("\nADS Python Search:")
for path in ads_paths:
try:
result = subprocess.run([path, "--version"],
capture_output=True, text=True)
if result.returncode == 0:
print(f"✓ Found: {path}")
print(f" Version: {result.stdout.strip()}")
except:
pass
print("\nRecommendation:")
if sys.version_info >= (3, 8):
print("✓ Your Python is compatible with both PyAEDT and ADS 2023+")
print(" Use Solution 2 (Single Environment)")
elif sys.version_info >= (3, 7):
print("⚠ Your Python works with PyAEDT but check ADS version")
print(" Use Solution 1 or 2 depending on ADS Python")
else:
print("✗ Your Python is too old for PyAEDT")
print(" Use Solution 1 (Decoupled Architecture)")| Your ADS Version | Recommended Solution | Setup Complexity |
|---|---|---|
| ADS 2023+ | Solution 2 (Single Env) | ⭐ Easy |
| ADS 2022 | Solution 1 or 2 | ⭐⭐ Medium |
| ADS 2020-2021 | Solution 1 (Decoupled) | ⭐⭐⭐ Medium |
| ADS 2019 or older | Solution 3 (File-Based) | ⭐⭐ Easy |
- Check your ADS and Python versions
- Run
check_compatibility.py - Choose the appropriate solution
- See
docs/getting_started.mdfor detailed setup
The framework is designed to be flexible and work with your specific environment!