So the particular issue Pedro is running into now is due to a sequence of events: 1) There was a piece of code added to appdirs 1.4.4 (compared to 1.4.3 which was pulled for previous charm builds): https://github.com/ActiveState/appdirs/blame/1.4.4/setup.py#L24-L28 It contains a seemingly unharmful piece of code to read the content of appdirs.py which contains unicode characters: https://github.com/ActiveState/appdirs/blob/1.4.4/appdirs.py#L4 2) During the installation from wheelhouse, correct dependencies are used and so the layer-basic fix is sound in that regard. 3) setup.py gets called and thus the code from appdirs 1.4.4 tries to read the lines of appdirs.py containing unicode characters. This results in the following: https://pastebin.canonical.com/p/MfpvPBjzZn/ 2020-05-19 05:12:55 DEBUG install Complete output from command python setup.py egg_info: 2020-05-19 05:12:55 DEBUG install Traceback (most recent call last): 2020-05-19 05:12:55 DEBUG install File "", line 1, in 2020-05-19 05:12:55 DEBUG install File "/tmp/pip-install-v5e474hs/appdirs/setup.py", line 25, in 2020-05-19 05:12:55 DEBUG install for line in read("appdirs.py").splitlines(): 2020-05-19 05:12:55 DEBUG install File "/tmp/pip-install-v5e474hs/appdirs/setup.py", line 19, in read 2020-05-19 05:12:55 DEBUG install out = "\n" + inf.read().replace("\r\n", "\n") 2020-05-19 05:12:55 DEBUG install File "/var/lib/juju/agents/unit-octavia-0/.venv/lib/python3.6/encodings/ascii.py", line 26, in decode 2020-05-19 05:12:55 DEBUG install return codecs.ascii_decode(input, self.errors)[0] 2020-05-19 05:12:55 DEBUG install UnicodeDecodeError: 'ascii' codec can't decode byte 0xc8 in position 129: ordinal not in range(128) 2020-05-19 05:12:55 DEBUG install 2020-05-19 05:12:55 DEBUG install ---------------------------------------- 2020-05-19 05:12:55 DEBUG install Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-v5e474hs/appdirs/ Now, to why this happens: * on bionic python3.6 is used and it is affected by the following behavior if LANG is not set (this doesn't happen on 3.8 for example): Python 3.6.9 (default, Apr 18 2020, 01:56:04) [GCC 8.4.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import locale >>> locale.getpreferredencoding() 'ANSI_X3.4-1968' https://docs.python.org/3/library/functions.html#open "encoding is the name of the encoding used to decode or encode the file. This should only be used in text mode. The default encoding is platform dependent (whatever ***locale.getpreferredencoding() returns***), but any text encoding supported by Python can be used. See the codecs module for the list of supported encodings." - basically, ASCII is used if LANG is not set with python 3.6. * Pedro's environment has juju 2.6.x which doesn't have this Juju commit that adds LANG=C.UTF-8 to all hook environments https://github.com/juju/juju/commit/d9a55e9e900cd66e83d88b5643d7e1a2560c160c git tag --contains=d9a55e9e900cd66e83d88b5643d7e1a2560c160c | grep 2.6 ; echo $? 1 git tag --contains=d9a55e9e900cd66e83d88b5643d7e1a2560c160c | grep 2.7 ; echo $? juju-2.7-beta1 ... - with LANG unset, open('appdirs.py') uses the ASCII decoder and fails when it encounters utf-8 code units. https://github.com/python/cpython/blob/f5c108959532898f855ed8f0d4f21ade3aa46393/Lib/_pyio.py#L1929 -- It is safe to say that Juju 2.7.x should be used so that LANG is set and the issue is avoided which is what we concluded with Pedro.