Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision | |||
| indigo_2023.2_documentation:python_version_conflicts [2023/12/30 18:59] – [Indigo Python Installation] davel17 | indigo_2023.2_documentation:python_version_conflicts [2024/06/27 00:08] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ===== Python Version Conflicts ===== | ||
| + | Over the years, we've seen multiple reports of issues concerning Python modules, Python versions etc. We'd like to clear this up so that when people run across issues you can understand what's going on. | ||
| + | |||
| + | ==== Indigo Python Installation ==== | ||
| + | |||
| + | First and foremost - Indigo installs Python as part of the install process. We use the installers from python.org, which install here on your Indigo Server Mac: | ||
| + | |||
| + | < | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | Inside that directory are the versions that either we have installed (2.7, 3.10, 3.11 etc.) or which might have been installed by you if you downloaded a Python installer from python.org. Which ones are present is based on the Indigo release you're using. Since Indigo 2022.1, Indigo has been using Python 3. | ||
| + | |||
| + | === Starting up the Python interpreter installed by Indigo === | ||
| + | |||
| + | If you need to use the Python interpreter installed by Indigo directly from a command line (or shebang), it's always | ||
| + | |||
| + | - **''/ | ||
| + | - **''/ | ||
| + | - **''/ | ||
| + | - **''/ | ||
| + | |||
| + | === Installing packages using the right pip3 === | ||
| + | |||
| + | In the same way discussed above (using the right interpreter), | ||
| + | |||
| + | - **''/ | ||
| + | - **''/ | ||
| + | - **''/ | ||
| + | - **''/ | ||
| + | |||
| + | ==== Other Python Installs ==== | ||
| + | |||
| + | So far, we've only discussed Python installations that are performed from the macOS installers available on python.org (which we use from our installer). Problems can arise when you (or some installer you run) installs a different 3rd party version of Python. The three most common sources of a 3rd party Python install are: homebrew, macports, and Xcode. Each will leave the existing Indigo-installed Pythons alone (so Indigo will continue to work), but they will insert themselves in unexpected ways, like by altering the **PATH** in your terminal sessions to point to other locations, unexpectedly replacing symlinks, or my installing into locations that are in your PATH variable before ''/ | ||
| + | |||
| + | === Xcode === | ||
| + | |||
| + | Xcode installs Python 3.9 (as of Xcode 14.2) inside the Xcode application bundle, and inserts these executables **/ | ||
| + | |||
| + | === homebrew & macports === | ||
| + | |||
| + | We believe homebrew and macports install their Python installs under a directory they create called opt (short for optional): | ||
| + | |||
| + | < | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | so it's nice and separate, but it will also likely add items to your **PATH** which will point to these locations for **python3** and **pip3**, so again if you don't specify a full path you might not be getting the right one. | ||
| + | |||
| + | ==== Troubleshooting ==== | ||
| + | |||
| + | Each of the different installers mentioned above will do several things: | ||
| + | |||
| + | They will insert paths into the various '' | ||
| + | |||
| + | Let's start with the second one first: they will add their own '' | ||
| + | |||
| + | The problem is that when you install further modules using **pip3** (**the one they installed for you** since you didn't specify a full path), those modules will get installed into their site-packages directory rather than the one from our Python install (''/ | ||
| + | |||
| + | It is possible that you can manage having multiple Python installs - you just have to remember which paths to executables you need to use to get modules installed in the correct place. | ||
| + | |||
| + | We **highly** recommend that you do not install 3rd party Pythons. This will make sure that your Indigo experience is as painless as possible. | ||