This script has worked for many years but now i'm building up a new 22.04 environment and just installed python2 for some backward compatibility. I've also installed lxml (i believe). Not sure why our legacy ant build is giving us this error and if anyoneknows that the new updated python syntax should be? Note: this is from packager.py from alpaca part of our legacy build.
[exec] Creating deb files
[exec] Traceback (most recent call last):
[exec] File "../../../../filtec-bin/packages/alpacaKV_packaging/packager.py", line 20, in <module>
[exec] import lxml.etree as ET
[exec] ImportError: No module named lxml.etree
I had installed python2 (does not come by default in 22.04) and linked the default /usr/bin/python to this.
$:~/eclipse-workspace/filtec-src/src$ python --version
Python 2.7.18
$:~/eclipse-workspace/filtec-src/src$ pip install lxml
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: lxml in /home/james/.local/lib/python3.10/site-packages (4.9.1)
UPDATE
Thanks to SuperStormer installing with pip2 fixed my issue:
sudo apt install python-pip
pip2 install lxml