Compile and install Python 3.12.2 on opensuse 15.5 x64 but can't setup venv

Here I configure and mak altinstall Python 3.12.2 source code on Opensuse 15.5 x64 os, but can’t use python3.12 -m venv /localpath to setup venv. Below errors shows. How to solve the issue?

autoyast:/app/software/python/3.12.2/bin # 次世代 → python3.12 -m venv /script/Python3/
Traceback (most recent call last):
File “”, line 189, in _run_module_as_main
File “”, line 148, in _get_module_details
File “”, line 112, in _get_module_details
File “/app/software/python/3.12.2/lib/python3.12/venv/init.py”, line 10, in
import subprocess
File “/app/software/python/3.12.2/lib/python3.12/subprocess.py”, line 104, in
from _posixsubprocess import fork_exec as _fork_exec
ModuleNotFoundError: No module named ‘_posixsubprocess’

Look at the configure output for messages about missing optional dependencies.

Check that you have installed all the development dependencies needed to build python.

You could also look at how the opensuse python it packaged and update that package for you needs.

Hello, I checked config.log. The exit code is 0. Only below lines filtered out are about _posixsubprocess modle. I’m not sure whether the module is missing during compile or not.

py_cv_module__posixsubprocess=yes
MODULE__POSIXSUBPROCESS_FALSE=‘#’
MODULE__POSIXSUBPROCESS_STATE=yes
MODULE__POSIXSUBPROCESS_TRUE=‘’

I do not have an opensuse system to experiment on but what I would do in your
position is get the package for the existing python and find out how it is built.

This is what I do all the time for packages on RPM based systems.
Get the source RPM and see what the build instructions are.

But I do not know opensuse and how it packages stuff.

Now I narrow down to below missing dependencies. Please update me which additional pakcages should be installed on opensuse 15.5. Thanks.

The necessary bits to build these optional modules were not found:
_curses_panel _lzma nis
To find the necessary bits, look in configure.ac and config.log.

I do not have a clue… as I said I do NOT havce any opensuse specific knowledge.