Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
pascal-hofmann opened this issue Nov 1, 2023 · 1 comment
Labels

Comments

@pascal-hofmann
Copy link

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.

@Ac0lyte
Copy link

Ac0lyte commented Oct 4, 2024

For anyone else who manages to get this far because this came up on google. I found a workaround for Python v3.12.1
pip install setuptools

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants