Hi,
I would like to install self compiled python versions in my opensuse home directory.
Unfortunately many basic modules are not installed.
To achieve this, I did the following (trying to mimic instructions for other distros):
zypper in tk-devel sqlite3-devel gdbm-devel readline6-devel openssl-devel
ver=3.11.1
cd
wget -O- https://www.python.org/ftp/python/${ver}/Python-${ver}.tar.xz | tar xJf -
cd Python-${ver}
./configure --prefix=$PWD/run
make -j8
make install
Now this most basic check works:
~/Python-3.11.1/run/bin/python3 --version
Python 3.11.1
Mostly anything else fails (interactive mode misses readline, calling venv misses _posixsubprocess, …)
But the install errors without any error messages make it hard to fix:
The necessary bits to build these optional modules were not found:
nis
To find the necessary bits, look in setup.py in detect_modules() for the module's name.
Failed to build these modules:
_asyncio _bisect _blake2
_bz2 _codecs_cn _codecs_hk
_codecs_iso2022 _codecs_jp _codecs_kr
_codecs_tw _contextvars _crypt
_csv _ctypes _curses
_curses_panel _datetime _dbm
_decimal _elementtree _gdbm
_hashlib _heapq _json
_lsprof _lzma _md5
_multibytecodec _multiprocessing _opcode
_pickle _posixshmem _posixsubprocess
_queue _random _sha1
_sha256 _sha3 _sha512
_socket _sqlite3 _ssl
_statistics _struct _tkinter
_typing _uuid _xxsubinterpreters
_zoneinfo array audioop
binascii cmath fcntl
grp math mmap
ossaudiodev pyexpat readline
resource select spwd
syslog termios unicodedata
xxlimited xxlimited_35 zlib
Could not build the ssl module!
Python requires a OpenSSL 1.1.1 or newer
I already checked that the installed openssl-devel version is 1.1.1d. Should be good enough.
Any ideas what could cause these or how I get decent error messages and not just this (which looks just fine to me):
building '_posixsubprocess' extension
gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -std=c11 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Werror=implicit-function-declaration -fvisibility=hidden -I./Include/internal -fPIC -I./Include -I/home/joachim/Python-3.11.1/run/include -I. -I/usr/local/include -I/home/joachim/Python-3.11.1/Include -I/home/joachim/Python-3.11.1 -c /home/joachim/Python-3.11.1/Modules/_posixsubprocess.c -o build/temp.linux-x86_64-3.11/home/joachim/Python-3.11.1/Modules/_posixsubprocess.o
-pthread -shared build/temp.linux-x86_64-3.11/home/joachim/Python-3.11.1/Modules/_posixsubprocess.o -L/home/joachim/Python-3.11.1/run/lib -L/usr/local/lib -o build/lib.linux-x86_64-3.11/_posixsubprocess.cpython-311-x86_64-linux-gnu.so
building 'readline' extension
gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -std=c11 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Werror=implicit-function-declaration -fvisibility=hidden -I./Include/internal -fPIC -I./Include -I/home/joachim/Python-3.11.1/run/include -I. -I/usr/local/include -I/home/joachim/Python-3.11.1/Include -I/home/joachim/Python-3.11.1 -c /home/joachim/Python-3.11.1/Modules/readline.c -o build/temp.linux-x86_64-3.11/home/joachim/Python-3.11.1/Modules/readline.o
-pthread -shared build/temp.linux-x86_64-3.11/home/joachim/Python-3.11.1/Modules/readline.o -L/usr/lib/termcap -L/home/joachim/Python-3.11.1/run/lib -L/usr/local/lib -lreadline -o build/lib.linux-x86_64-3.11/readline.cpython-311-x86_64-linux-gnu.so