Only the last part of the result:
[root@ns8 ~]# (
set -e -x
core_dir=/usr/local/agent/pyenv
mv -v ${core_dir} ${core_dir}.bak
python3.11 -mvenv ${core_dir} --upgrade-deps --system-site-packages
${core_dir}/bin/pip3 install -r /etc/nethserver/pyreq3_11.txt
echo "/usr/local/agent/pypkg" >$(${core_dir}/bin/python3 -c "import sys; print(sys.path[-1] + '/pypkg.pth')")
rm -rf ${core_dir}.bak
)
................................................................
Requirement already satisfied: setuptools>=62.4.0 in /usr/local/agent/pyenv/lib64/python3.11/site-packages (from python-daemon==3.0.1->-r /etc/nethserver/pyreq3_11.txt (line 35)) (68.2.0)
Collecting charset-normalizer<4.0,>=2.0 (from aiohttp==3.8.4->-r /etc/nethserver/pyreq3_11.txt (line 7))
Using cached charset_normalizer-2.1.1-py3-none-any.whl (39 kB)
Using cached ansible_core-2.15.1-py3-none-any.whl (2.2 MB)
Using cached cryptography-41.0.1-cp37-abi3-manylinux_2_28_x86_64.whl (4.3 MB)
Using cached MarkupSafe-2.1.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (28 kB)
Using cached semver-3.0.1-py3-none-any.whl (17 kB)
Using cached typing_extensions-4.6.3-py3-none-any.whl (31 kB)
Using cached frozenlist-1.4.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (250 kB)
Installing collected packages: resolvelib, pyasn1, ptyprocess, lockfile, urllib3, typing-extensions, six, semver, regex-engine, PyYAML, pyrsistent, pycparser, psutil, pexpect, packaging, multidict, MarkupSafe, ldap3, idna, hiredis, frozenlist, docutils, dnspython, charset-normalizer, chardet, certifi, attrs, async-timeout, yarl, requests, redis, python-daemon, jsonschema, Jinja2, cffi, aiosignal, aioredis, pycares, cryptography, brotlipy, ansible-runner, aiohttp, ansible-core, aiodns
Successfully installed Jinja2-3.1.2 MarkupSafe-2.1.3 PyYAML-6.0 aiodns-3.0.0 aiohttp-3.8.4 aioredis-2.0.1 aiosignal-1.3.1 ansible-core-2.15.1 ansible-runner-2.3.1 async-timeout-4.0.2 attrs-22.2.0 brotlipy-0.7.0 certifi-2022.9.24 cffi-1.15.1 chardet-5.1.0 charset-normalizer-2.1.1 cryptography-41.0.1 dnspython-2.3.0 docutils-0.20 frozenlist-1.4.0 hiredis-2.2.3 idna-3.3 jsonschema-4.10.3 ldap3-2.9.1 lockfile-0.12.2 multidict-6.0.4 packaging-23.0 pexpect-4.8.0 psutil-5.9.4 ptyprocess-0.7.0 pyasn1-0.4.8 pycares-4.3.0 pycparser-2.21 pyrsistent-0.18.1 python-daemon-3.0.1 redis-4.5.5 regex-engine-1.1.0 requests-2.28.1 resolvelib-1.0.1 semver-3.0.1 six-1.16.0 typing-extensions-4.6.3 urllib3-1.26.12 yarl-1.9.2
+ echo /usr/local/agent/pypkg
++ /usr/local/agent/pyenv/bin/python3 -c 'import sys; print(sys.path[-1] + '\''/pypkg.pth'\'')'
+ rm -i -rf /usr/local/agent/pyenv.bak
[root@ns8 ~]#
[root@ns8 ~]#
[root@ns8 ~]# runagent python3 --version # output should be 3.11
Python 3.11.2
[root@ns8 ~]#