Skip to content

Add support for Python 3.12, install.sh fails (distutils module removed) #778

@veny

Description

@veny

distutils is removed in Python 3.12.

install.sh fails with following message:

ModuleNotFoundError: No module named 'distutils'
Traceback (most recent call last):
  File "/tmp/oci_cli_install_tmp_gdAY", line 722, in <module>
    main()
  File "/tmp/oci_cli_install_tmp_gdAY", line 705, in main
    venv_site_packages_directory = subprocess.check_output([venv_python_executable, '-c', 'from distutils.sysconfig import get_python_lib; print(get_python_lib())']).strip()
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/subprocess.py", line 466, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/opt/oci-cli-3.41.0/bin/python', '-c', 'from distutils.sysconfig import get_python_lib; print(get_python_lib())']' returned non-zero exit status 1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions