Mailing List Archive

problems installing Python 3.11
Hi ML,

i hope this is the right place for my question. If not please tell me where I can ask.

I tried to install python 3.11.4 on a SLES 15 SP5.
./configure ran fine, just one package missing. Installed the package, configure ran fine with complaints.
make was ok, make test not.
This is what I got to the end:
===================================================================================================================================
===============================================================
ERROR: test_build_cpp11 (test.test_cppext.TestCPPExt.test_build_cpp11)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/root/Python-3.11.4/Lib/test/test_cppext.py", line 21, in test_build_cpp11
self.check_build(False, '_testcpp11ext')
File "/root/Python-3.11.4/Lib/test/test_cppext.py", line 39, in check_build
self._check_build(std_cpp03, extension_name)
File "/root/Python-3.11.4/Lib/test/test_cppext.py", line 80, in _check_build
run_cmd('Build', cmd)
File "/root/Python-3.11.4/Lib/test/test_cppext.py", line 64, in run_cmd
subprocess.run(cmd, check=True)
File "/root/Python-3.11.4/Lib/subprocess.py", line 571, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['env/bin/python', '-X', 'dev', '/root/Python-3.11.4/Lib/test/setup_testcppext.py', 'build_ext', '--verbose']' returned non-zero exit status 1.

----------------------------------------------------------------------
Ran 2 tests in 9.939s

FAILED (errors=2)
test test_cppext failed
1 test failed again:
test_cppext

== Tests result: FAILURE then FAILURE ==

403 tests OK.

1 test failed:
test_cppext

30 tests skipped:
test_bz2 test_curses test_dbm_gnu test_dbm_ndbm test_devpoll
test_gdb test_idle test_ioctl test_kqueue test_launcher test_lzma
test_msilib test_nis test_ossaudiodev test_readline test_smtpnet
test_sqlite3 test_ssl test_startfile test_tcl test_tix test_tk
test_ttk_guionly test_ttk_textonly test_turtle test_winconsoleio
test_winreg test_winsound test_zipfile64 test_zoneinfo

2 re-run tests:
test___all__ test_cppext

Total duration: 28 min 23 sec
Tests result: FAILURE then FAILURE
make: *** [Makefile:1798: test] Error 2

=========================================================================================================

I'm not very familiar with compiling software, normally I use the packages from my distro.
Can you help me ? Or maybe there is no big problem, afterall 403 tests were fine and just two not.
I need Python 3.11 for borgbackup.

Thanks.

Bernd

Bernd Lentes

--
Bernd Lentes
System Administrator
MCD
Helmholtzzentrum München
+49 89 3187 1241
bernd.lentes@helmholtz-munich.de
https://www.helmholtz-munich.de/en/mcd


Helmholtz Zentrum München – Deutsches Forschungszentrum für Gesundheit und Umwelt (GmbH)
Ingolstädter Landstraße 1, D-85764 Neuherberg, https://www.helmholtz-munich.de
Geschäftsführung: Prof. Dr. med. Dr. h.c. Matthias Tschöp, Daniela Sommer (komm.) | Aufsichtsratsvorsitzende: MinDir’in Prof. Dr. Veronika von Messling
Registergericht: Amtsgericht München HRB 6466 | USt-IdNr. DE 129521671
--
https://mail.python.org/mailman/listinfo/python-list
RE: problems installing Python 3.11 [ In reply to ]
>-----Original Message-----
>From: Terry Reedy <tjreedy@udel.edu>
>Sent: Thursday, August 10, 2023 9:55 PM
>To: Bernd Lentes <bernd.lentes@helmholtz-muenchen.de>
>Subject: Re: problems installing Python 3.11
>
>On 8/10/2023 3:28 PM, Bernd Lentes via Python-list wrote:
>
>Private response because cannot post at present.
>
>It appears that what failed is building a C++ extension. (You can dig into the test
>code to check. It is skipped on my Windows.) If you do not need to do that, you
>should not have a problem.
>

Hi Terry,

I found out that cc1plus was missing. I installed g++, rerun make and this error disappeared.
But another has arised:

====================================================================================
--- STDERR ---
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/tmphpwu2qwj/cpython/Lib/sysconfig.py", line 715, in get_config_var
return get_config_vars().get(name)
^^^^^^^^^^^^^^^^^
File "/tmp/tmphpwu2qwj/cpython/Lib/sysconfig.py", line 670, in get_config_vars
_init_posix(_CONFIG_VARS)
File "/tmp/tmphpwu2qwj/cpython/Lib/sysconfig.py", line 531, in _init_posix
_temp = __import__(name, globals(), locals(), ['build_time_vars'], 0)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named '_sysconfigdata__linux_x86_64-linux-gnu'

---- END ----
building python parallel='-j21' in /tmp/tmphpwu2qwj/python-build...
installing python into /tmp/tmphpwu2qwj/python-installation...
freezing /tmp/tmphpwu2qwj/app.py...
ok

----------------------------------------------------------------------
Ran 1 test in 95.606s

OK

== Tests result: FAILURE then SUCCESS ==

404 tests OK.

30 tests skipped:
test_bz2 test_curses test_dbm_gnu test_dbm_ndbm test_devpoll
test_gdb test_idle test_ioctl test_kqueue test_launcher test_lzma
test_msilib test_nis test_ossaudiodev test_readline test_smtpnet
test_sqlite3 test_ssl test_startfile test_tcl test_tix test_tk
test_ttk_guionly test_ttk_textonly test_turtle test_winconsoleio
test_winreg test_winsound test_zipfile64 test_zoneinfo

1 re-run test:
test_tools

Total duration: 29 min 56 sec
Tests result: FAILURE then SUCCESS

================================================================================

Or does " FAILURE then SUCCESS" mean that everything is ok now ?

Bernd

Helmholtz Zentrum München – Deutsches Forschungszentrum für Gesundheit und Umwelt (GmbH)
Ingolstädter Landstraße 1, D-85764 Neuherberg, https://www.helmholtz-munich.de
Geschäftsführung: Prof. Dr. med. Dr. h.c. Matthias Tschöp, Daniela Sommer (komm.) | Aufsichtsratsvorsitzende: MinDir’in Prof. Dr. Veronika von Messling
Registergericht: Amtsgericht München HRB 6466 | USt-IdNr. DE 129521671
--
https://mail.python.org/mailman/listinfo/python-list
RE: problems installing Python 3.11 [ In reply to ]
>-----Original Message-----
>From: Python-list <python-list-bounces+bernd.lentes=helmholtz-
>muenchen.de@python.org> On Behalf Of Bernd Lentes via Python-list
>Sent: Friday, August 11, 2023 12:01 PM
>To: Terry Reedy <tjreedy@udel.edu>
>Cc: Python ML (python-list@python.org) <python-list@python.org>
>Subject: RE: problems installing Python 3.11

Hi,

I read the readme.rst and found something helpful.
I reran explicitly the test which failed:

=============================================================
localhost:~/Python-3.11.4 # make test TESTOPTS="-v test_tools"
CC='gcc -pthread' LDSHARED='gcc -pthread -shared ' OPT='-DNDEBUG -g -fwrapv -O3 -Wall' ./python -E ./setup.py build
running build
running build_ext

The necessary bits to build these optional modules were not found:
_bz2 _curses _curses_panel
_dbm _gdbm _hashlib
_lzma _ssl _tkinter
_uuid nis readline
To find the necessary bits, look in setup.py in detect_modules() for the module's name.


The following modules found by detect_modules() in setup.py have not
been built, they are *disabled* by configure:
_sqlite3


Could not build the ssl module!
Python requires a OpenSSL 1.1.1 or newer

running build_scripts
copying and adjusting /root/Python-3.11.4/Tools/scripts/pydoc3 -> build/scripts-3.11
copying and adjusting /root/Python-3.11.4/Tools/scripts/idle3 -> build/scripts-3.11
copying and adjusting /root/Python-3.11.4/Tools/scripts/2to3 -> build/scripts-3.11
changing mode of build/scripts-3.11/pydoc3 from 644 to 755
changing mode of build/scripts-3.11/idle3 from 644 to 755
changing mode of build/scripts-3.11/2to3 from 644 to 755
renaming build/scripts-3.11/pydoc3 to build/scripts-3.11/pydoc3.11
renaming build/scripts-3.11/idle3 to build/scripts-3.11/idle3.11
renaming build/scripts-3.11/2to3 to build/scripts-3.11/2to3-3.11
./python -E ./Tools/scripts/run_tests.py -v test_tools
/root/Python-3.11.4/python -u -W default -bb -E -E -m test -r -w -j 0 -u all,-largefile,-audio,-gui -v test_tools
== CPython 3.11.4 (main, Aug 11 2023, 00:05:59) [GCC 7.5.0]
== Linux-5.14.21-150500.55.12-default-x86_64-with-glibc2.31 little-endian
== cwd: /root/Python-3.11.4/build/test_python_8347æ
== CPU count: 32
== encodings: locale=UTF-8, FS=utf-8
Using random seed 9455548
0:00:00 load avg: 0.07 Run tests in parallel using 34 child processes
0:00:30 load avg: 2.51 running: test_tools (30.0 sec)
0:01:00 load avg: 2.44 running: test_tools (1 min)
0:01:30 load avg: 2.16 running: test_tools (1 min 30 sec)
0:01:40 load avg: 2.21 [1/1] test_tools passed (1 min 40 sec)
test_alter_comments (test.test_tools.test_fixcid.Test.test_alter_comments) ... ok
test_directory (test.test_tools.test_fixcid.Test.test_directory) ... ok
test_parse_strings (test.test_tools.test_fixcid.Test.test_parse_strings) ... ok
test_freeze_simple_script (test.test_tools.test_freeze.TestFreeze.test_freeze_simple_script) ... creating the script to be frozen at /tmp/tmp73do0elf/app.py
copying the source tree into /tmp/tmp73do0elf/cpython...
configuring python in /tmp/tmp73do0elf/python-build...
CalledProcessError: Command '['/tmp/tmp73do0elf/cpython/python', '-c', 'import sysconfig; print(sysconfig.get_config_var("CONFIG_ARGS"))']' returned non-zero exit status 1.
--- STDOUT ---

--- STDERR ---
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/tmp73do0elf/cpython/Lib/sysconfig.py", line 715, in get_config_var
return get_config_vars().get(name)
^^^^^^^^^^^^^^^^^
File "/tmp/tmp73do0elf/cpython/Lib/sysconfig.py", line 670, in get_config_vars
_init_posix(_CONFIG_VARS)
File "/tmp/tmp73do0elf/cpython/Lib/sysconfig.py", line 531, in _init_posix
_temp = __import__(name, globals(), locals(), ['build_time_vars'], 0)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named '_sysconfigdata__linux_x86_64-linux-gnu'

---- END ----
building python parallel='-j21' in /tmp/tmp73do0elf/python-build...
installing python into /tmp/tmp73do0elf/python-installation...
freezing /tmp/tmp73do0elf/app.py...
ok
test_gprof (test.test_tools.test_gprof2html.Gprof2htmlTests.test_gprof) ... ok
test_POT_Creation_Date (test.test_tools.test_i18n.Test_pygettext.test_POT_Creation_Date)
Match the date format from xgettext for POT-Creation-Date ... ok
test_calls_in_fstring_with_keyword_args (test.test_tools.test_i18n.Test_pygettext.test_calls_in_fstring_with_keyword_args) ... ok
test_calls_in_fstring_with_multiple_args (test.test_tools.test_i18n.Test_pygettext.test_calls_in_fstring_with_multiple_args) ... ok
test_calls_in_fstring_with_partially_wrong_expression (test.test_tools.test_i18n.Test_pygettext.test_calls_in_fstring_with_partially_wrong_expression) ... ok
test_calls_in_fstrings (test.test_tools.test_i18n.Test_pygettext.test_calls_in_fstrings) ... ok
test_calls_in_fstrings_attribute (test.test_tools.test_i18n.Test_pygettext.test_calls_in_fstrings_attribute) ... ok
test_calls_in_fstrings_nested (test.test_tools.test_i18n.Test_pygettext.test_calls_in_fstrings_nested) ... ok
test_calls_in_fstrings_raw (test.test_tools.test_i18n.Test_pygettext.test_calls_in_fstrings_raw) ... ok
test_calls_in_fstrings_with_call_on_call (test.test_tools.test_i18n.Test_pygettext.test_calls_in_fstrings_with_call_on_call) ... ok
test_calls_in_fstrings_with_format (test.test_tools.test_i18n.Test_pygettext.test_calls_in_fstrings_with_format) ... ok
test_calls_in_fstrings_with_wrong_input_1 (test.test_tools.test_i18n.Test_pygettext.test_calls_in_fstrings_with_wrong_input_1) ... ok
test_calls_in_fstrings_with_wrong_input_2 (test.test_tools.test_i18n.Test_pygettext.test_calls_in_fstrings_with_wrong_input_2) ... ok
test_classdocstring (test.test_tools.test_i18n.Test_pygettext.test_classdocstring) ... ok
test_classdocstring_bytes (test.test_tools.test_i18n.Test_pygettext.test_classdocstring_bytes) ... ok
test_classdocstring_early_colon (test.test_tools.test_i18n.Test_pygettext.test_classdocstring_early_colon)
Test docstring extraction for a class with colons occurring within ... ok
test_classdocstring_fstring (test.test_tools.test_i18n.Test_pygettext.test_classdocstring_fstring) ... ok
test_files_list (test.test_tools.test_i18n.Test_pygettext.test_files_list)
Make sure the directories are inspected for source files ... ok
test_funcdocstring (test.test_tools.test_i18n.Test_pygettext.test_funcdocstring) ... ok
test_funcdocstring_annotated_args (test.test_tools.test_i18n.Test_pygettext.test_funcdocstring_annotated_args)
Test docstrings for functions with annotated args ... ok
test_funcdocstring_annotated_return (test.test_tools.test_i18n.Test_pygettext.test_funcdocstring_annotated_return)
Test docstrings for functions with annotated return type ... ok
test_funcdocstring_bytes (test.test_tools.test_i18n.Test_pygettext.test_funcdocstring_bytes) ... ok
test_funcdocstring_defvalue_args (test.test_tools.test_i18n.Test_pygettext.test_funcdocstring_defvalue_args)
Test docstring for functions with default arg values ... ok
test_funcdocstring_fstring (test.test_tools.test_i18n.Test_pygettext.test_funcdocstring_fstring) ... ok
test_funcdocstring_multiple_funcs (test.test_tools.test_i18n.Test_pygettext.test_funcdocstring_multiple_funcs)
Test docstring extraction for multiple functions combining ... ok
test_header (test.test_tools.test_i18n.Test_pygettext.test_header)
Make sure the required fields are in the header, according to: ... ok
test_moduledocstring (test.test_tools.test_i18n.Test_pygettext.test_moduledocstring) ... ok
test_moduledocstring_bytes (test.test_tools.test_i18n.Test_pygettext.test_moduledocstring_bytes) ... ok
test_moduledocstring_fstring (test.test_tools.test_i18n.Test_pygettext.test_moduledocstring_fstring) ... ok
test_msgid (test.test_tools.test_i18n.Test_pygettext.test_msgid) ... ok
test_msgid_bytes (test.test_tools.test_i18n.Test_pygettext.test_msgid_bytes) ... ok
test_msgid_fstring (test.test_tools.test_i18n.Test_pygettext.test_msgid_fstring) ... ok
test_lll_multiple_dirs (test.test_tools.test_lll.lllTests.test_lll_multiple_dirs) ... ok
test_checksum_fodder (test.test_tools.test_md5sum.MD5SumTests.test_checksum_fodder) ... ok
test_dash_l (test.test_tools.test_md5sum.MD5SumTests.test_dash_l) ... ok
test_dash_s (test.test_tools.test_md5sum.MD5SumTests.test_dash_s) ... ok
test_dash_t (test.test_tools.test_md5sum.MD5SumTests.test_dash_t) ... ok
test_multiple_files (test.test_tools.test_md5sum.MD5SumTests.test_multiple_files) ... ok
test_noargs (test.test_tools.test_md5sum.MD5SumTests.test_noargs) ... ok
test_usage (test.test_tools.test_md5sum.MD5SumTests.test_usage) ... ok
test_pathfix (test.test_tools.test_pathfix.TestPathfixFunctional.test_pathfix) ... ok
test_pathfix_adding_errors (test.test_tools.test_pathfix.TestPathfixFunctional.test_pathfix_adding_errors) ... ok
test_pathfix_adding_flag (test.test_tools.test_pathfix.TestPathfixFunctional.test_pathfix_adding_flag) ... ok
test_pathfix_keeping_flags (test.test_tools.test_pathfix.TestPathfixFunctional.test_pathfix_keeping_flags) ... ok
test_recursive (test.test_tools.test_pathfix.TestPathfixFunctional.test_recursive) ... ok
test_inverse_attribute_error (test.test_tools.test_pdeps.PdepsTests.test_inverse_attribute_error) ... ok
test_process_errors (test.test_tools.test_pdeps.PdepsTests.test_process_errors) ... ok
test_empty_line (test.test_tools.test_pindent.PindentTests.test_empty_line) ... ok
test_escaped_newline (test.test_tools.test_pindent.PindentTests.test_escaped_newline) ... ok
test_multilevel (test.test_tools.test_pindent.PindentTests.test_multilevel) ... ok
test_oneline (test.test_tools.test_pindent.PindentTests.test_oneline) ... ok
test_preserve_indents (test.test_tools.test_pindent.PindentTests.test_preserve_indents) ... ok
test_selftest (test.test_tools.test_pindent.PindentTests.test_selftest) ... ok
test_statements (test.test_tools.test_pindent.PindentTests.test_statements) ... ok
test_help (test.test_tools.test_reindent.ReindentTests.test_help) ... ok
test_noargs (test.test_tools.test_reindent.ReindentTests.test_noargs) ... ok
test_reindent_file_with_bad_encoding (test.test_tools.test_reindent.ReindentTests.test_reindent_file_with_bad_encoding) ... ok
test_analyze_dxp_import (test.test_tools.test_sundry.TestSundryScripts.test_analyze_dxp_import) ... ok
test_sundry (test.test_tools.test_sundry.TestSundryScripts.test_sundry) ... ok
test_sundry_windows (test.test_tools.test_sundry.TestSundryScripts.test_sundry_windows) ... skipped 'Windows-only test'

----------------------------------------------------------------------
Ran 64 tests in 100.758s

OK (skipped=1)

== Tests result: SUCCESS ==

1 test OK.

Total duration: 1 min 40 sec
Tests result: SUCCESS
===================================================

Now I'm unsure. SUCCESS despite a traceback ?

Bernd

Helmholtz Zentrum München – Deutsches Forschungszentrum für Gesundheit und Umwelt (GmbH)
Ingolstädter Landstraße 1, D-85764 Neuherberg, https://www.helmholtz-munich.de
Geschäftsführung: Prof. Dr. med. Dr. h.c. Matthias Tschöp, Daniela Sommer (komm.) | Aufsichtsratsvorsitzende: MinDir’in Prof. Dr. Veronika von Messling
Registergericht: Amtsgericht München HRB 6466 | USt-IdNr. DE 129521671
--
https://mail.python.org/mailman/listinfo/python-list