Differences
This shows you the differences between two versions of the page.
| indigo_2022.2_documentation:python_packages [2023/02/24 02:13] – [Python 3.10.2 Packages Installed by Indigo] davel17 | indigo_2022.2_documentation:python_packages [2024/06/27 00:08] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ===== Python Packages and Indigo ===== | ||
| + | |||
| + | This page describes how **Indigo 2022.2.0** works with Python, specifically with respect to packages/ | ||
| + | |||
| + | Indigo 2022.2 shipped with [[api_release_notes: | ||
| + | |||
| + | You may know that Indigo plugins run in a process called the IndigoPluginHost (IPH). With this release, there are now 2 versions of the IPH process: IndigoPluginHost (IPH2 for clarity), which runs the legacy Python 2 API, and IndigoPluginHost3 (IPH3) which runs the new Python 3 based API. We determine which version to use when starting a plugin (by which API the plugin specifies). API 3.0 and later will run the IPH3 process, anything earlier will run the older IPH2 process. | ||
| + | |||
| + | For this release, **all embedded and external Python scripts will be run in IPH3 (and therefore Python 3)** - so you will need to update your scripts if they aren't working (we can't automatically tell if they will work or not unfortunately). We believe that simple scripts will most likely work without change, but if not, you can walk through [[https:// | ||
| + | |||
| + | The Indigo 2022.2 installer includes the Python 2.7.18 installer (which is Intel only) and the Python 3.10.2 installer (includes Intel and Apple Silicon support) from [[https:// | ||
| + | === Installing Additional Python Packages with Indigo 2022.2 === | ||
| + | |||
| + | As noted above, Indigo 2022.2 ships with two versions of Python. Each version contains several modules in addition to Python' | ||
| + | |||
| + | <color orange> | ||
| + | |||
| + | For plugins that use Python 3, use '' | ||
| + | |||
| + | < | ||
| + | Last login: Tue jan 1 12:34:56 on console | ||
| + | user@my mac ~ % pip3 install tensorflow | ||
| + | ... | ||
| + | </ | ||
| + | |||
| + | For plugins that use Python 2, use '' | ||
| + | |||
| + | < | ||
| + | Last login: Tue jan 1 12:34:56 on console | ||
| + | user@my mac ~ % pip2 install pytorch | ||
| + | ... | ||
| + | </ | ||
| + | |||
| + | To see which packages are installed, use the '' | ||
| + | |||
| + | < | ||
| + | Last login: Tue jan 1 12:34:56 on ttys000 | ||
| + | user@my mac ~ % pip3 list | ||
| + | Package | ||
| + | ------------------ --------- | ||
| + | astroid | ||
| + | certifi | ||
| + | charset-normalizer 2.0.11 | ||
| + | cycler | ||
| + | fonttools | ||
| + | ... | ||
| + | user@my mac ~ % | ||
| + | </ | ||
| + | **<color blue> | ||
| + | |||
| + | To see more detailed information about an individual package, use the '' | ||
| + | |||
| + | < | ||
| + | Last login: Sun Mar 27 10:20:04 on ttys000 | ||
| + | user@my mac ~ % pip3 show requests | ||
| + | Name: requests | ||
| + | Version: 2.27.1 | ||
| + | Summary: Python HTTP for Humans. | ||
| + | Home-page: https:// | ||
| + | Author: Kenneth Reitz | ||
| + | Author-email: | ||
| + | License: Apache 2.0 | ||
| + | Location: / | ||
| + | Requires: charset-normalizer, | ||
| + | Required-by: | ||
| + | user@my mac ~ % | ||
| + | </ | ||
| + | Particularly helpful in the '' | ||
| + | |||
| + | <color red> | ||
| + | === Python Packages for Plugin Developers === | ||
| + | |||
| + | Because the packages included with Indigo should not be modified (to ensure a smoothly running server), plugin developers must include any other desired version within the plugin package. Plugin developers should note that some Python packages will not integrate universally across all installations as they rely on code compiled for specific hardware configurations (for example, Intel vs. Apple silicon). The IPH processes use the following [[https:// | ||
| + | |||
| + | The '' | ||
| + | - '' | ||
| + | - '' | ||
| + | - IndigoPluginHost3 (inside the app itself) | ||
| + | - ''/ | ||
| + | - ''/ | ||
| + | |||
| + | and the '' | ||
| + | - '' | ||
| + | - IndigoPluginHost (inside the app itself) | ||
| + | - ''/ | ||
| + | - ''/ | ||
| + | |||
| + | Packages are installed in three ways: | ||
| + | |||
| + | - Some packages are included within the IPH itself. These are " | ||
| + | - You may add modules/ | ||
| + | - Other packages are installed using a '' | ||
| + | |||
| + | === Access to IPH3 Libraries === | ||
| + | There are some important implications that result from having some libraries included in the IPH3. Namely, those packages will be available to plugins, Indigo scripts (embedded and linked), the Indigo python shell (from the menu item or by doing '' | ||
| + | |||
| + | ^ Method | ||
| + | | plugins | ||
| + | | embedded scripts | ||
| + | | linked scripts | ||
| + | | Indigo python shell using Indigo menu | yes | | ||
| + | | Indigo python shell using Terminal '' | ||
| + | | Mac Terminal using '' | ||
| + | |||
| + | === Python Packages for Scripters === | ||
| + | |||
| + | In this release, all Python scripts (either embedded or linked) are executed using the IPH3 process using Python 3. Therefore, the server will be able to locate any packages your scripts use in the same way as described above: | ||
| + | |||
| + | - IndigoPluginHost3 | ||
| + | - / | ||
| + | - / | ||
| + | |||
| + | If you need a module/ | ||
| + | |||
| + | * **/ | ||
| + | * **/ | ||
| + | |||
| + | **<color orange> | ||
| + | |||
| + | **<color orange> | ||
| + | === If Something Goes Wrong === | ||
| + | |||
| + | To provide users with a measure of safety regarding the Python packages that Indigo installs, the Indigo installer also includes the capacity to repair the Python installation if something should become damaged. For example, if a user were to accidentally upgrade one of the Python packages -- and as a result cause the Indigo server to stop functioning properly -- re-running the Indigo installer may be able to bring things back under control. There' | ||
| + | |||
| + | Re-running the Indigo installer on an existing server shouldn' | ||
| + | |||
| + | === Moving Indigo to a New Machine === | ||
| + | Depending on the method used, any Python modules installed via **pip3** may need to be re-installed on the new machine. For more information, | ||
| + | === Python 3.10.2 Packages Installed by Indigo === | ||
| + | |||
| + | Indigo 2022.2 ships with support for the following Python 3 packages in addition to the packages installed with the standard Python framework. Generally, if earlier versions of the listed packages are installed at the location Indigo uses, they will be upgraded to the version numbers below. | ||
| + | |||
| + | ^ Included inside IPH 3\\ Unmodifiable | ||
| + | ^ Python Package | ||
| + | | py-applescript | ||
| + | | certifi | ||
| + | | charset_normalizer | 2.0.12 | - cffi | | ||
| + | | python-dateutil | ||
| + | | idna | ||
| + | | jedi | ||
| + | | oauthlib | ||
| + | | packaging | ||
| + | | parso | 0.8.3 | janus | ||
| + | | pudb | ||
| + | | pyaes | 1.3.0 | Jinja2 | ||
| + | | pygments | ||
| + | | pyparsing | ||
| + | | pyserial | ||
| + | | requests | ||
| + | | requests-oauthlib | ||
| + | | urllib3 | ||
| + | | urwid | 2.1.2 | pyparsing | ||
| + | | xmljson | ||
| + | | | | pyobjc | ||
| + | | | | sanic | ||
| + | | | | - aiofiles | ||
| + | | | | - httptools | ||
| + | | | | - multidict | ||
| + | | | | - sanic-routing | ||
| + | | | | - sanic-session | ||
| + | | | | - ujson | ||
| + | | | | - uvloop | ||
| + | | | | - websockets | ||
| + | | | | scipy | ||
| + | | | | six | ||
| + | |||
| + | === Python 2.7.18 Packages Installed by Indigo === | ||
| + | |||
| + | Indigo 2022.1 ships with the following Python 2 packages in addition to the packages installed with the standard Python framework. | ||
| + | |||
| + | ^ Included inside IPH 2\\ Unmodifiable | ||
| + | ^ Python Package | ||
| + | | enum | 1.1.6 |backports.functools-lru-cache | 1.6.4 | | ||
| + | | oauthlib | ||
| + | | requests | ||
| + | | requests-oauthlib | 0.8.0 |kiwisolver | ||
| + | | pudb | 2016.1 |matplotlib | ||
| + | | py-applescript | ||
| + | | pyaes | ||
| + | | pygments | ||
| + | | pyserial | ||
| + | | python-dateutil | ||
| + | | six | ||
| + | | urwid | ||
| + | | xmljson | ||