Skip to content

Add Python3.12 install instructions#195

Merged
brosenberg42 merged 5 commits into
developfrom
feat/py3.12
Sep 10, 2025
Merged

Add Python3.12 install instructions#195
brosenberg42 merged 5 commits into
developfrom
feat/py3.12

Conversation

@brosenberg42
Copy link
Copy Markdown
Member

@brosenberg42 brosenberg42 commented Mar 17, 2025

Copy link
Copy Markdown
Member

@jrobble jrobble left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 5 of 5 files at r1, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @brosenberg42)


a discussion (no related file):
Please update openmpf.github.io/docs/docs/Python-Batch-Component-API.md everywhere py38 and cp38 are mentioned.


docs/docs/Development-Environment-Guide.md line 226 at r1 (raw file):

- Run `cd ~/openmpf-projects/openmpf/trunk/workflow-manager/src/main/resources/properties/; cp mpf-private-example.properties mpf-private.properties`

- Run `pip3.8 install ansible`

Do you mean to use pip3.12 here?

@jrobble
Copy link
Copy Markdown
Member

jrobble commented Aug 5, 2025

docs/docs/Development-Environment-Guide.md line 226 at r1 (raw file):

Previously, jrobble (Jeff Robble) wrote…

Do you mean to use pip3.12 here?

I tried python3.12 -m pip install ansible and got:

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/usr/lib/python3/dist-packages/pip/__main__.py", line 16, in <module>
    from pip._internal.cli.main import main as _main  # isort:skip # noqa
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/pip/_internal/cli/main.py", line 10, in <module>
    from pip._internal.cli.autocompletion import autocomplete
  File "/usr/lib/python3/dist-packages/pip/_internal/cli/autocompletion.py", line 9, in <module>
    from pip._internal.cli.main_parser import create_main_parser
  File "/usr/lib/python3/dist-packages/pip/_internal/cli/main_parser.py", line 7, in <module>
    from pip._internal.cli import cmdoptions
  File "/usr/lib/python3/dist-packages/pip/_internal/cli/cmdoptions.py", line 19, in <module>
    from distutils.util import strtobool
ModuleNotFoundError: No module named 'distutils'

I read that the distutils package was deprecated in Python 3.10 and removed in Python 3.12.

Is that why were using Python 3.8 for the install?

Copy link
Copy Markdown
Member Author

@brosenberg42 brosenberg42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 2 of 7 files reviewed, 2 unresolved discussions (waiting on @brosenberg42 and @jrobble)


a discussion (no related file):

Previously, jrobble (Jeff Robble) wrote…

Please update openmpf.github.io/docs/docs/Python-Batch-Component-API.md everywhere py38 and cp38 are mentioned.

Done.


docs/docs/Development-Environment-Guide.md line 226 at r1 (raw file):

Previously, jrobble (Jeff Robble) wrote…

I tried python3.12 -m pip install ansible and got:

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/usr/lib/python3/dist-packages/pip/__main__.py", line 16, in <module>
    from pip._internal.cli.main import main as _main  # isort:skip # noqa
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/pip/_internal/cli/main.py", line 10, in <module>
    from pip._internal.cli.autocompletion import autocomplete
  File "/usr/lib/python3/dist-packages/pip/_internal/cli/autocompletion.py", line 9, in <module>
    from pip._internal.cli.main_parser import create_main_parser
  File "/usr/lib/python3/dist-packages/pip/_internal/cli/main_parser.py", line 7, in <module>
    from pip._internal.cli import cmdoptions
  File "/usr/lib/python3/dist-packages/pip/_internal/cli/cmdoptions.py", line 19, in <module>
    from distutils.util import strtobool
ModuleNotFoundError: No module named 'distutils'

I read that the distutils package was deprecated in Python 3.10 and removed in Python 3.12.

Is that why were using Python 3.8 for the install?

I am using Python 3.8 for ansible compatibility.

Copy link
Copy Markdown
Member

@jrobble jrobble left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jrobble reviewed 1 of 5 files at r2, 4 of 4 files at r3, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @brosenberg42)


docs/docs/Development-Environment-Guide.md line 226 at r1 (raw file):

Previously, brosenberg42 wrote…

I am using Python 3.8 for ansible compatibility.

So the sudo apt install [...] python3.8-dev python3-pip python3.8-venv part is for ansible?

Do you mean compatibility with with the current format of the ansible scripts?

If so, should we create a separate task to update our Ansible scripts so that developers don't need to install Python 3.8?

Ansible 2.16 supports Python 3.12. Ansible is now on 2.19.1.

Copy link
Copy Markdown
Member Author

@brosenberg42 brosenberg42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @jrobble)


docs/docs/Development-Environment-Guide.md line 226 at r1 (raw file):

Do you mean compatibility with with the current format of the ansible scripts?

No. Your experiment above proved that is not the case. The failure is happening before ansible is even installed.

Copy link
Copy Markdown
Member

@jrobble jrobble left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jrobble reviewed 5 of 5 files at r4, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @brosenberg42)


docs/docs/Development-Environment-Guide.md line 226 at r1 (raw file):

Previously, brosenberg42 wrote…

Do you mean compatibility with with the current format of the ansible scripts?

No. Your experiment above proved that is not the case. The failure is happening before ansible is even installed.

Let's revisit this as part of the Ubuntu upgrade task: openmpf/openmpf#1687

@brosenberg42 brosenberg42 merged commit bf2156b into develop Sep 10, 2025
1 check was pending
@brosenberg42 brosenberg42 deleted the feat/py3.12 branch September 10, 2025 17:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants