VanDyke Software

Tips

Index

How to Use Python Scripting with SecureCRT on macOS

Introduction

Automation via scripting in SecureCRT on the macOS platform requires installation of a compatible Python installation. This tip documents the use of Python in SecureCRT.

Which variants of Python are supported in SecureCRT?

Python installations from python.org and Homebrew are officially supported.

Python.org

Python installations from www.python.org are recommended.

Homebrew

Homebrew installations of Python can be successful. However, Python installed via Homebrew is for use with Homebrew and other Homebrew tools/components/apps. Non-Homebrew apps can experience difficulty finding/loading Python – so you may want to use the Python installation from www.python.org instead.

Which versions of Python does SecureCRT support?

The System Requirements topic in the Introduction chapter of SecureCRT’s built-in help will display a list of supported Python versions specific to the SecureCRT release you’re running.

Additionally, a list of only those specific versions of Python supported in the current release is shown in the error message that appears if you attempt to run a Python script in SecureCRT, but SecureCRT is unable to locate a Python scripting engine. For example, in the graphic below, only Python versions 3.13, 3.12, 3.11, and 3.10 are supported in the release of SecureCRT that is displaying the message. If an individual on this system installed Python 3.14, it simply wouldn’t work with this version of SecureCRT.

The error message explains only Python 3.10.x, 3.11.x, 3.12.x and 3.13.x versions are compatible with this version of SecureCRT.

Where should Python be installed so SecureCRT can load it?

SecureCRT doesn’t currently refer to any environment variables to determine where Python is installed. At process startup, SecureCRT on macOS expects Python to be found in one of the following two standard locations:

  • /Library/Frameworks/Python.framework/Versions/3.x/Python
  • /opt/homebrew/Frameworks/Python.framework/Versions/3.x/Python

What if a compatible Python version has already been installed and the “Unable to load the Python engine” error still occurs when I try to run a script?

Completely exit the SecureCRT app and start a new instance.

Although the error “Unable to load the Python scripting engine” is displayed when you attempt to run a script in SecureCRT, the check for a compatible Python library only occurs once - when the SecureCRT process is first launched. This means that if a compatible version of Python exists at one of the expected locations and SecureCRT is still reporting the error, “Unable to load the Python scripting engine,” then you will need to completely close SecureCRT (COMMAND+Q) and launch a fresh instance of SecureCRT.

VanDyke Software uses cookies to give you the best online experience. Before continuing to use this site, please confirm that you agree to our use of cookies. Please see our Cookie Usage for details.