반응형
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe3 in position 701: ordinal not in range(128) |
env에 lang를 utf-8로 세팅해주면 해결됨.
아래는 관련 이슈
# http://bugs.python.org/issue19846 # > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK. ENV LANG C.UTF-8 |
이걸로 삽질 꽤나 함.
외국인들은 utf가 필요없으니까 안 쓰지만 한국어 관련 python lib를 사용하려면 설정해야 함.
아래는 ubuntu에서 python3.6 설정하는 dockerfile임.
############ # Python 3.6 RUN apt-get update RUN apt-get install -y software-properties-common vim RUN add-apt-repository ppa:jonathonf/python-3.6 RUN apt-get update RUN apt-get install -y build-essential python3.6 python3.6-dev python3-pip python3.6-venv RUN apt-get install -y git # update pip RUN python3.6 -m pip install pip --upgrade RUN python3.6 -m pip install wheel ENV LANG C.UTF-8 |
반응형
'개발_이야기 > Docker' 카테고리의 다른 글
multi-speaker-tacotron-tensorflow DockerImage (0) | 2017.11.05 |
---|---|
Unable to docker login through CLI - unauthorized: incorrect username or password (0) | 2017.11.05 |