{"id":24293,"library":"pyaedt","title":"PyAEDT","description":"High-level Python API for automating Ansys Electronics Desktop (AEDT). Currently at version 0.26.3 with frequent releases (approximately monthly). Python >=3.10 required.","status":"active","version":"0.26.3","language":"python","source_language":"en","source_url":"https://github.com/ansys/pyaedt","tags":["ansys","electronics","aedt","simulation","api"],"install":[{"cmd":"pip install pyaedt","lang":"bash","label":"pip"}],"dependencies":[],"imports":[{"note":"Deprecated in v0.26.0; use top-level import.","wrong":"from pyaedt.hfss import Hfss","symbol":"Hfss","correct":"from pyaedt import Hfss"},{"note":"Deprecated; Maxwell2d is now accessible from pyaedt.","wrong":"from pyaedt.maxwell import Maxwell2d","symbol":"Maxwell2d","correct":"from pyaedt import Maxwell2d"}],"quickstart":{"code":"from pyaedt import Hfss\nhfss = Hfss(specified_version=\"2025.1\", new_desktop=True)\nhfss.close_desktop()","lang":"python","description":"Initialize a new HFSS design. Replace version string as needed."},"warnings":[{"fix":"Replace with 'from pyaedt import Hfss'.","message":"Direct import of submodules like 'from pyaedt.hfss import Hfss' is deprecated. Use 'from pyaedt import Hfss'.","severity":"deprecated","affected_versions":">=0.26.0"},{"fix":"Use Hfss(new_desktop=True, close_on_exit=True) instead of Hfss(desktop_class=True).","message":"In v0.26.0, the 'desktop_class' parameter is replaced by 'new_desktop' and 'close_on_exit'.","severity":"breaking","affected_versions":">=0.26.0"},{"fix":"Ensure Ansys Electronics Desktop is installed and the version matches the specified_version. Set environment variable ANSYSEM_ROOT2025.1 to the install path.","message":"PyAEDT requires AEDT to be installed and licensed. Errors like 'OSError: AEDT not found' occur if AEDT is not in the expected path.","severity":"gotcha","affected_versions":"all"},{"fix":"Set environment variable PYAEDT_NON_GRAPHICAL=1 before importing pyaedt.","message":"Non-graphical mode must be used in CI/headless environments. Without it, AEDT may try to launch the GUI and fail.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use 'from pyaedt import Hfss' instead.","cause":"Import path changed in v0.26.0; 'pyaedt.hfss' is no longer a valid submodule.","error":"ModuleNotFoundError: No module named 'pyaedt.hfss'"},{"fix":"Set the environment variable ANSYSEM_ROOT2025.1 (use your version) to the AEDT installation folder, or use the 'specified_version' parameter with a valid version.","cause":"PyAEDT cannot locate the AEDT installation.","error":"OSError: AEDT not found. Check if AEDT is installed and the environment variable is set."},{"fix":"Replace 'desktop_class' with 'new_desktop'.","cause":"The 'desktop_class' parameter was removed in v0.26.0.","error":"TypeError: __init__() got an unexpected keyword argument 'desktop_class'"},{"fix":"Set PYAEDT_NON_GRAPHICAL=1 environment variable before running the script.","cause":"Headless server without display support.","error":"Exception: PyAEDT is running in graphical mode. Use non-graphical mode to avoid display issues."}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}