script-python-executable-path
--script-python-executable-path
is a global parameter for the Liquibase Checks extension. It specifies the path Liquibase uses to run the Python executable associated with a virtual environment.
Uses
By default, Liquibase runs Custom Policy Checks using the built-in Python virtual environment bundled with the Liquibase Checks extension JAR. A virtual environment isolates the Python libraries you install for a particular project. This prevents conflicts with other projects, which might use different versions of modules in those libraries.
However, the built-in Python virtual environment only comes with a few external modules. If you want to install additional modules, or if you want your IDE to recognize the Liquibase Python modules, you have to create your own virtual environment.
Once you create your custom virtual environment, you can use the --script-python-executable-path
parameter to specify the path to the Python executable for that environment. This tells Liquibase to use your custom virtual environment to execute Python scripts while running Policy Checks Commands.
For more information, see Create a Python Virtual Environment.
Syntax
You can set this parameter in the following ways:
Option | Syntax |
---|---|
Liquibase properties file (defaults file) |
|
Global flow file argument (example) |
|
Global CLI parameter |
|
JVM system property (JAVA_OPTS Environment Variable) |
|
Liquibase Environment Variables |
|
For more information, see Working with Command Parameters.