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. Thanks, Cem Karan -- https://mail.python.org/mailman/listinfo/python-list