pan-os-python icon indicating copy to clipboard operation
pan-os-python copied to clipboard

pan-os-python is incompatible with python 3.12 due to missing `distutils` package

Open pascal-hofmann opened this issue 1 year ago • 1 comments

Describe the bug

The distutils package which is required for the version checks in pan-os-python has been removed in python 3.12.

PEP 632: Remove the distutils package. See the migration guide for advice replacing the APIs it provided. The third-party Setuptools package continues to provide distutils, if you still require it in Python 3.12 and beyond.

Expected behavior

pan-os-python should work.

Current behavior

File "/Users/someuser/.local/pipx/venvs/somevenv/lib/python3.12/site-packages/panos/init.py", line 35, in from distutils.version import LooseVersion # Used by PanOSVersion class ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ModuleNotFoundError: No module named 'distutils'

Possible solution

Follow the migration guide and use the packaging package instead.

pascal-hofmann avatar Nov 01 '23 08:11 pascal-hofmann