community icon indicating copy to clipboard operation
community copied to clipboard

port select must be given the executable name pip38 not the package name py38-pip (affects website: installation-osx.rst)

Open Poikilos opened this issue 1 year ago • 3 comments
trafficstars

Maintainer merge checklist

  • [ ] Title is descriptive/clear for inclusion in release notes.
  • [ ] Applied a Component: xxx label.
  • [ ] Applied the api-deprecation or api-break label.
  • [ ] Applied the release-highlight label to be highlighted in release notes.
  • [ ] Added to the milestone version it was merged into.
  • [ ] Unittests are included in PR.
  • [ ] Properly documented, including versionadded, versionchanged as needed.

Poikilos avatar May 09 '24 19:05 Poikilos

Maybe we can upgrade everything to python312?

I'm not familiar with port, there's a way to be more "generalistic" and just use the latest non-beta Python version?

misl6 avatar May 09 '24 19:05 misl6

According to MacPorts, Python and pip 3.12 will build on any version of macOS, so that seems fine:

  • https://ports.macports.org/port/python312/builds/
  • https://ports.macports.org/port/py312-pip/builds/

But for the brew commands (for Homebrew) they only show continuous integration back to macOS Monterey:

The oldest macs that still work are usually upgradeable to Catalina at most, so before changing the brew commands testing Python 3.12 on Catalina is ideal. I can do that soon. See also: https://apple.fandom.com/wiki/List_of_Mac_OS_versions#Mac_OS_X_/_macOS

Poikilos avatar May 10 '24 13:05 Poikilos

Maybe we can upgrade everything to python312?

Ok, I've pushed the change after testing it on macOS Catalina and running kivy and one of the examples (Catalina reached EOL only in November 20, 2022 so realistically many people still use it and can't afford a brand new mac).

I'm not familiar with port, there's a way to be more "generalistic" and just use the latest non-beta Python version?

There does not appear to be a way to do that built into MacPorts.

  • There doesn't appear to be any documentation to do so, and all documentation I found uses specific versions.
  • There is no "python" package, only numbered versions.

Out of curiosity I managed to do it this way (not committed to git), but it is rather hideous and the first line takes several seconds:

    PY_V=$(port search python | grep -E "^python[0-9][0-9]+ " | cut -d ' ' -f 1 | cut -c 7- | sort -n | tail -n 1)
    port install python$PY_V
    port select --set python python$PY_V
    port install pip$PY_V
    port select --set pip pip$PY_V
    # and optionally
    port select --set python3 python$PY_V
    port select --set pip3 pip$PY_V

Poikilos avatar May 15 '24 03:05 Poikilos