mirror of
https://github.com/kennethreitz/pydantic.git
synced 2026-06-05 23:00:18 +00:00
6e0f81c73f
With CentOS 7 Python 3.6, running install from source with pip failed:
sudo podman run -ti --rm centos:7
yum -y update
yum -y install epel-release
yum -y install git python3 python3-devel python3-pip python3-setuptools python3-wheel
git clone https://github.com/samuelcolvin/pydantic.git
cd pydantic
pip3 install .
With following error message:
[root@c99d0585636c pydantic]# pip3 install .
Processing /pydantic
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-91v_ixvz-build/setup.py", line 62, in <module>
history = (THIS_DIR / 'HISTORY.md').read_text()
File "/usr/lib64/python3.6/pathlib.py", line 1197, in read_text
return f.read()
File "/usr/lib64/python3.6/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 14648: ordinal not in range(128)
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-91v_ixvz-build/
This PR add the required `read_text(encoding='utf-8')` for `setup.py`.
Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
49 B
49 B
Add read_text(encoding='utf-8') for setup.py