FYI apparmor and lxc in Ubuntu

CFK cfkaran2 at
Sat Jul 14 10:36:05 EDT 2018

Hi all, this is just an FYI in case anyone else has the same issue I just
ran into. If you use python 3.6 or 3.7 under Ubuntu with lxc, you may
discover that your site-packages aren't being imported correctly within the
container, but when you SSH in, everything works correctly. If that
happens, check the config file for apparmor; on my system (Ubuntu 16.0.4),
it disallowed python 3.6+.

You will also need to set the language environment variable for lxc to use
UTF-8, or your strings may get discarded (it defaults to ASCII). SSH goes
through a different path for setting up the environment, so sshing in won't
trigger the error.

Cem Karan

More information about the Python-list mailing list