RE: problems installing Python 3.11

2023-08-11 Thread Bernd Lentes via Python-list

>-Original Message-
>From: Python-list muenchen...@python.org> On Behalf Of Bernd Lentes via Python-list
>Sent: Friday, August 11, 2023 12:01 PM
>To: Terry Reedy 
>Cc: Python ML (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 "", line 1, in 
  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_fstri

RE: problems installing Python 3.11

2023-08-11 Thread Bernd Lentes via Python-list

>-Original Message-
>From: Terry Reedy 
>Sent: Thursday, August 10, 2023 9:55 PM
>To: Bernd Lentes 
>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 "", line 1, in 
  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


problems installing Python 3.11

2023-08-10 Thread Bernd Lentes via Python-list
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.len...@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