Closed dacut closed 1 year ago
dacut, im having the same issue.
Do you know how to set LANG on AmazonLinux Docker container?
Build a new container; in the Dockerfile for it, include this before installing kappa (or whatever depends on kappa):
FROM amazonlinux:latest
ENV LANG=en_US.UTF-8
Or you can prefix your pip install
:
LANG=en_US.UTF-8 pip install kappa
Thanks :)
Running
pip install kappa
in a barebones environment (e.g. AmazonLinux Docker container), or anything where LANG is not UTF-8 (e.g.en_US.UTF-8
) fails without this patch. This is becausesetup.py
runsopen_file("README.rst")
, which in turn opens the file in text mode. On Python 3, this uses the ASCII codec, butREADME.rst
contains UTF-8 characters.This patch forcibly parses
README.rst
(andrequirements.txt
) as UTF-8 regardless of the user's codec.