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

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

Closed
veny opened this issue May 22, 2024 · 9 comments
Closed

Comments

@veny
Copy link

veny commented May 22, 2024

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.
@zeroows
Copy link

zeroows commented Aug 25, 2024

Any Update on this?

@karthik-k-kamath
Copy link
Member

Hi, we (CLI team) is planning to add support for Python 3.12, in next couple of months, which should address this issue.
Closing this issue for now as CLI only supports till Python 3.11

@12345ieee
Copy link

I understand taking your time for a proper python 3.12 support, but would it be possible to just add a pip install setuptools in the venv to just get past this step?

I have the cli half installed in a python 3.12 machine (like many others), it looks working, I'd appreciate if the install process could progress ASAP as far as it can if the fixes are simple.

Thanks.

@karthik-k-kamath
Copy link
Member

Thanks Andrea for the suggestions. I will check with the team if this can be brought in faster

@NatanRigailo
Copy link

@karthik-k-kamath i have a PR planned for this issue, i was waiting for my OCA approval, can i still submit the PR?

@karthik-k-kamath
Copy link
Member

Yes Natan, please do.

@kaiucosta
Copy link

alguma previsão para aplicar a sugestão do @12345ieee ?

@karthik-k-kamath
Copy link
Member

I will check with team and come back on the possibility of providing an earlier fix

@brasrox
Copy link

brasrox commented Sep 3, 2024

ubuntu 24.04 have py 3.12.3
install of oci cli breaks in
pip install setuptools doesnot work too

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

No branches or pull requests

7 participants