What is the best image for Python 3 server?

Hello Guys,

I have tried Ubuntu (finally managed to get it booted) and Debian.
Some packages just won’t install on Ubuntu (ncclient) others (pandas) takes 40 mins to get installed.

Which image do you recommend?

Thanks!
Istvan

Hi Istvan_Kelemen,

Installation take a long time because of need to compile. What information is prompted when an installation error occurs?

Hello,
@setq
you can find the error here.
https://github.com/ncclient/ncclient/issues/385

Try

sudo apt-get install python3-lxml

and reinstall ncclient

Hey,

Unfortunately it did not help.

linaro@linaro-alip:~$ sudo apt-get install python3-lxml

sudo: unable to resolve host linaro-alip
Reading package lists… Done
Building dependency tree
Reading state information… Done
Suggested packages:
python3-lxml-dbg python-lxml-doc
Recommended packages:
python3-bs4 python3-html5lib
The following NEW packages will be installed:
python3-lxml
0 upgraded, 1 newly installed, 0 to remove and 3 not upgraded.
Need to get 721 kB of archives.
After this operation, 3067 kB of additional disk space will be used.
Get:1 http://cdn-fastly.deb.debian.org/debian stretch/main arm64 python3-lxml arm64 3.7.1-1 [721 kB]
Fetched 721 kB in 0s (3147 kB/s)
Selecting previously unselected package python3-lxml.
(Reading database … 106430 files and directories currently installed.)
Preparing to unpack …/python3-lxml_3.7.1-1_arm64.deb …
Unpacking python3-lxml (3.7.1-1) …
Setting up python3-lxml (3.7.1-1) …
linaro@linaro-alip:~$ python3.8 -m pip install ncclient
Defaulting to user installation because normal site-packages is not writeable
Collecting ncclient
Using cached ncclient-0.6.7.tar.gz (605 kB)
Requirement already satisfied: setuptools>0.6 in /usr/local/lib/python3.8/site-packages (from ncclient) (41.2.0)
Requirement already satisfied: paramiko>=1.15.0 in /usr/local/lib/python3.8/site-packages (from ncclient) (2.7.1)
Collecting lxml>=3.3.0
Using cached lxml-4.5.0.tar.gz (4.5 MB)
Requirement already satisfied: six in /usr/local/lib/python3.8/site-packages (from ncclient) (1.14.0)
Requirement already satisfied: pynacl>=1.0.1 in /usr/local/lib/python3.8/site-packages (from paramiko>=1.15.0->ncclient) (1.3.0)
Requirement already satisfied: cryptography>=2.5 in /usr/local/lib/python3.8/site-packages (from paramiko>=1.15.0->ncclient) (2.9)
Requirement already satisfied: bcrypt>=3.1.3 in /usr/local/lib/python3.8/site-packages (from paramiko>=1.15.0->ncclient) (3.1.7)
Requirement already satisfied: cffi>=1.4.1 in /usr/local/lib/python3.8/site-packages (from pynacl>=1.0.1->paramiko>=1.15.0->ncclient) (1.14.0)
Requirement already satisfied: pycparser in /usr/local/lib/python3.8/site-packages (from cffi>=1.4.1->pynacl>=1.0.1->paramiko>=1.15.0->ncclient) (2.20)
Installing collected packages: lxml, ncclient
Running setup.py install for lxml … error
ERROR: Command errored out with exit status 1:
command: /usr/local/bin/python3.8 -u -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘"’"’/tmp/pip-install-zhp7oa3p/lxml/setup.py’"’"’; file=’"’"’/tmp/pip-install-zhp7oa3p/lxml/setup.py’"’"’;f=getattr(tokenize, ‘"’"‘open’"’"’, open)(file);code=f.read().replace(’"’"’\r\n’"’"’, ‘"’"’\n’"’"’);f.close();exec(compile(code, file, ‘"’"‘exec’"’"’))’ install --record /tmp/pip-record-6wm8ise7/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/linaro/.local/include/python3.8/lxml
cwd: /tmp/pip-install-zhp7oa3p/lxml/
Complete output (96 lines):
Building lxml version 4.5.0.
Building without Cython.
ERROR: b’/bin/sh: 1: xslt-config: not found\n’
** make sure the development packages of libxml2 and libxslt are installed **

Using build configuration of libxslt
running install
running build
running build_py
creating build
creating build/lib.linux-aarch64-3.8
creating build/lib.linux-aarch64-3.8/lxml
copying src/lxml/__init__.py -> build/lib.linux-aarch64-3.8/lxml
copying src/lxml/sax.py -> build/lib.linux-aarch64-3.8/lxml
copying src/lxml/ElementInclude.py -> build/lib.linux-aarch64-3.8/lxml
copying src/lxml/builder.py -> build/lib.linux-aarch64-3.8/lxml
copying src/lxml/doctestcompare.py -> build/lib.linux-aarch64-3.8/lxml
copying src/lxml/_elementpath.py -> build/lib.linux-aarch64-3.8/lxml
copying src/lxml/usedoctest.py -> build/lib.linux-aarch64-3.8/lxml
copying src/lxml/cssselect.py -> build/lib.linux-aarch64-3.8/lxml
copying src/lxml/pyclasslookup.py -> build/lib.linux-aarch64-3.8/lxml
creating build/lib.linux-aarch64-3.8/lxml/includes
copying src/lxml/includes/__init__.py -> build/lib.linux-aarch64-3.8/lxml/includes
creating build/lib.linux-aarch64-3.8/lxml/html
copying src/lxml/html/__init__.py -> build/lib.linux-aarch64-3.8/lxml/html
copying src/lxml/html/soupparser.py -> build/lib.linux-aarch64-3.8/lxml/html
copying src/lxml/html/_setmixin.py -> build/lib.linux-aarch64-3.8/lxml/html
copying src/lxml/html/_html5builder.py -> build/lib.linux-aarch64-3.8/lxml/html
copying src/lxml/html/formfill.py -> build/lib.linux-aarch64-3.8/lxml/html
copying src/lxml/html/clean.py -> build/lib.linux-aarch64-3.8/lxml/html
copying src/lxml/html/builder.py -> build/lib.linux-aarch64-3.8/lxml/html
copying src/lxml/html/ElementSoup.py -> build/lib.linux-aarch64-3.8/lxml/html
copying src/lxml/html/_diffcommand.py -> build/lib.linux-aarch64-3.8/lxml/html
copying src/lxml/html/diff.py -> build/lib.linux-aarch64-3.8/lxml/html
copying src/lxml/html/usedoctest.py -> build/lib.linux-aarch64-3.8/lxml/html
copying src/lxml/html/html5parser.py -> build/lib.linux-aarch64-3.8/lxml/html
copying src/lxml/html/defs.py -> build/lib.linux-aarch64-3.8/lxml/html
creating build/lib.linux-aarch64-3.8/lxml/isoschematron
copying src/lxml/isoschematron/__init__.py -> build/lib.linux-aarch64-3.8/lxml/isoschematron
copying src/lxml/etree.h -> build/lib.linux-aarch64-3.8/lxml
copying src/lxml/etree_api.h -> build/lib.linux-aarch64-3.8/lxml
copying src/lxml/lxml.etree.h -> build/lib.linux-aarch64-3.8/lxml
copying src/lxml/lxml.etree_api.h -> build/lib.linux-aarch64-3.8/lxml
copying src/lxml/includes/c14n.pxd -> build/lib.linux-aarch64-3.8/lxml/includes
copying src/lxml/includes/config.pxd -> build/lib.linux-aarch64-3.8/lxml/includes
copying src/lxml/includes/xmlschema.pxd -> build/lib.linux-aarch64-3.8/lxml/includes
copying src/lxml/includes/xinclude.pxd -> build/lib.linux-aarch64-3.8/lxml/includes
copying src/lxml/includes/tree.pxd -> build/lib.linux-aarch64-3.8/lxml/includes
copying src/lxml/includes/xmlerror.pxd -> build/lib.linux-aarch64-3.8/lxml/includes
copying src/lxml/includes/schematron.pxd -> build/lib.linux-aarch64-3.8/lxml/includes
copying src/lxml/includes/dtdvalid.pxd -> build/lib.linux-aarch64-3.8/lxml/includes
copying src/lxml/includes/xpath.pxd -> build/lib.linux-aarch64-3.8/lxml/includes
copying src/lxml/includes/uri.pxd -> build/lib.linux-aarch64-3.8/lxml/includes
copying src/lxml/includes/etreepublic.pxd -> build/lib.linux-aarch64-3.8/lxml/includes
copying src/lxml/includes/__init__.pxd -> build/lib.linux-aarch64-3.8/lxml/includes
copying src/lxml/includes/htmlparser.pxd -> build/lib.linux-aarch64-3.8/lxml/includes
copying src/lxml/includes/relaxng.pxd -> build/lib.linux-aarch64-3.8/lxml/includes
copying src/lxml/includes/xslt.pxd -> build/lib.linux-aarch64-3.8/lxml/includes
copying src/lxml/includes/xmlparser.pxd -> build/lib.linux-aarch64-3.8/lxml/includes
copying src/lxml/includes/etree_defs.h -> build/lib.linux-aarch64-3.8/lxml/includes
copying src/lxml/includes/lxml-version.h -> build/lib.linux-aarch64-3.8/lxml/includes
creating build/lib.linux-aarch64-3.8/lxml/isoschematron/resources
creating build/lib.linux-aarch64-3.8/lxml/isoschematron/resources/rng
copying src/lxml/isoschematron/resources/rng/iso-schematron.rng -> build/lib.linux-aarch64-3.8/lxml/isoschematron/resources/rng
creating build/lib.linux-aarch64-3.8/lxml/isoschematron/resources/xsl
copying src/lxml/isoschematron/resources/xsl/XSD2Schtrn.xsl -> build/lib.linux-aarch64-3.8/lxml/isoschematron/resources/xsl
copying src/lxml/isoschematron/resources/xsl/RNG2Schtrn.xsl -> build/lib.linux-aarch64-3.8/lxml/isoschematron/resources/xsl
creating build/lib.linux-aarch64-3.8/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_abstract_expand.xsl -> build/lib.linux-aarch64-3.8/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_dsdl_include.xsl -> build/lib.linux-aarch64-3.8/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_message.xsl -> build/lib.linux-aarch64-3.8/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_skeleton_for_xslt1.xsl -> build/lib.linux-aarch64-3.8/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_svrl_for_xslt1.xsl -> build/lib.linux-aarch64-3.8/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/readme.txt -> build/lib.linux-aarch64-3.8/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
running build_ext
building 'lxml.etree' extension
creating build/temp.linux-aarch64-3.8
creating build/temp.linux-aarch64-3.8/src
creating build/temp.linux-aarch64-3.8/src/lxml
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DCYTHON_CLINE_IN_TRACEBACK=0 -Isrc -Isrc/lxml/includes -I/usr/local/include/python3.8 -c src/lxml/etree.c -o build/temp.linux-aarch64-3.8/src/lxml/etree.o -w
In file included from src/lxml/etree.c:692:0:
src/lxml/includes/etree_defs.h:14:31: fatal error: libxml/xmlversion.h: No such file or directory
 #include "libxml/xmlversion.h"
                               ^
compilation terminated.
Compile failed: command 'gcc' failed with exit status 1
creating tmp
cc -I/usr/include/libxml2 -c /tmp/xmlXPathInittb6xzdou.c -o tmp/xmlXPathInittb6xzdou.o
/tmp/xmlXPathInittb6xzdou.c:1:26: fatal error: libxml/xpath.h: No such file or directory
 #include "libxml/xpath.h"
                          ^
compilation terminated.
*********************************************************************************
Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed?
*********************************************************************************
error: command 'gcc' failed with exit status 1
----------------------------------------

ERROR: Command errored out with exit status 1: /usr/local/bin/python3.8 -u -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘"’"’/tmp/pip-install-zhp7oa3p/lxml/setup.py’"’"’; file=’"’"’/tmp/pip-install-zhp7oa3p/lxml/setup.py’"’"’;f=getattr(tokenize, ‘"’"‘open’"’"’, open)(file);code=f.read().replace(’"’"’\r\n’"’"’, ‘"’"’\n’"’"’);f.close();exec(compile(code, file, ‘"’"‘exec’"’"’))’ install --record /tmp/pip-record-6wm8ise7/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/linaro/.local/include/python3.8/lxml Check the logs for full command output.

sudo apt-get install libxml2-dev libxslt-dev python3.8-dev

@setq
This command is not ecognized. I did run ```
sudo apt-get install libxml2-dev libxslt-dev python3-dev

It helped! Thank you!