Open bbs2web opened 11 months ago
I have managed to get Benji to work on Proxmox V8 by installing Python 3.9, creating the a Virtual Environment and installing Benji using pip. I also had to copy the python3-rados and python3-rbd modules from proxmox 7 to the Virtual Environment as the ones provided by Proxmox v8 only supports Python 3.11. Now benji is working as before.
The problem is the ruamel.yaml verion. In the setup.py the version check was changed to 'ruamel.yaml>=0.17,<0.18' which installs ruamel.yaml-0.16.13. Unfortunately the pypi version is 0.17 is behind and tries to use an older ruamel.yaml version which does not work with python 3.11.
For now I have set up an python 3.11 venv and pulled the source and use a helper "benji" script to load the code from my checkout path and installed the dependencies in the venv.
pip3 install 'PrettyTable>=0.7.2,<1' pip3 install 'sqlalchemy>=2.0.7,<3' pip3 install 'setproctitle>=1.1.8,<2' pip3 install 'python-dateutil>=2.6.0,<3' pip3 install 'alembic>=1.10.2,<2' pip3 install 'ruamel.yaml>=0.17,<0.18' pip3 install 'psycopg2-binary>=2.7.4,<3' pip3 install 'argcomplete>=1.9.4,<2' pip3 install 'sparsebitfield>=0.2.5,<1' pip3 install 'cerberus>=1.2,<2' pip3 install 'pycryptodome>=3.6.1,<4' pip3 install 'pyparsing>=2.3.0,<3' pip3 install 'semantic_version>=2.8.1,<3' pip3 install 'dateparser>=1.1.1,<2' pip3 install 'structlog>=19.1.0' pip3 install 'colorama>=0.4.1,<1' pip3 install 'diskcache>=3.0.6' pip3 install 'attrs >=21.4.0,<22'
For the sake of completeness what I did:
a) check out benji to shared dir on cephfs
git clone https://github.com/elemental-lf/benji.git /mnt/pve/cephfs/benji-src
b) Replaced /usr/local/bin/benji with:
source /usr/local/benji/bin/activate
python3 /mnt/pve/cephfs/benji-python3.11 $*
c) chmod +x /usr/local/bin/benji
d) Created modified benji-entrypoint-script /mnt/pve/cephfs/benji-python3.11:
#!/usr/bin/python3
# -*- coding: utf-8 -*-
import re
import sys
sys.path.append('/mnt/pve/cephfs/benji-src/src')
from benji.scripts.benji import main
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
sys.exit(main())
e) make python-rados/rdb modules available to venv:
ln -s /usr/lib/python3/dist-packages/rados.cpython-311-x86_64-linux-gnu.so /usr/local/benji/lib/python3.11/site-packages/rados.cpython-311-x86_64-linux-gnu.so;
ln -s /usr/lib/python3/dist-packages/rbd.cpython-311-x86_64-linux-gnu.so /usr/local/benji/lib/python3.11/site-packages/rbd.cpython-311-x86_64-linux-gnu.so;
@elemental-lf Could you please update the official benji pypi package (https://pypi.org/project/benji/).
Proxmox 8 upgrades python to 3.11, but the current benji pypi version 0.17.0, uses an older ryamel dependency which does not compilies on python 3.11.
The problem is alredy fixed in the benji master branch, but it currently can't any longer be installed or updated trough pip.
Hi,
The following thread references Python 3.11 being supported, am I missing something on a Debian 12 based system or should a new install work? https://github.com/elemental-lf/benji/issues/153
Error: