Repository navigation
Closed
Description
Description
Installing opeml in an ubuntu:18.04 docker container leads to this error:
Step 4/4 : RUN pip3 install openml
---> Running in d9c37780f2d7
Collecting openml
Downloading https://files.pythonhosted.org/packages/a4/5d/30ce4d1af609ba389d55654e6a7271619253dbbe7006a33bb20c703f0234/openml-0.11.0.tar.gz (110kB)
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-cqdtdqzh/openml/setup.py", line 20, in <module>
README = fid.read()
File "/usr/lib/python3.6/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 1722: ordinal not in range(128)
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-cqdtdqzh/openml/
ERROR: Service 'ba' failed to build: The command '/bin/sh -c pip3 install openml' returned a non-zero code: 1
Steps/Code to Reproduce
Here is the Dockerfile:
FROM ubuntu:18.04
#Make sure that we don't get interactive prompts during installs:
ENV DEBIAN_FRONTEND=noninteractive
#Install system dependencies:
RUN apt-get update && apt-get install -y \
bc \
build-essential \
gawk \
git \
gosu \
htop \
imagemagick \
nano \
python3-opencv \
python3-pip \
software-properties-common \
sudo \
&& rm -rf /var/lib/apt/lists/*
RUN pip3 install openml
Expected Results
A successful install of openml.
Note
Changing the FROM line to ubuntu:20.04 resolves the issue, but I have GPU driver compatibility constraints that require i use 18.04. 18.04 is supposed to be maintained for several more years, so it would be great if openml would install on that too.
Metadata
Metadata
Assignees
Labels
No labels
Activity
andyDoucette commentedon Nov 1, 2020
Two things:
This problem never used to happen. The same Dockerfile built just fine 3 months ago. Something changed in the meantime.
The problem goes away if I install python 3.8 in ubuntu 18.04 from a ppa. I hate to do this in a production system because it breaks a lot of other things down-stream, but it's information about what might be causing the issue. Looking at what changed in these versions, I suspect the fix had to do with the implementation of PEP 538. https://docs.python.org/3/whatsnew/3.7.html#whatsnew37-pep538. Is there a way openml can be changed to use the right decoding all the time?
andyDoucette commentedon Nov 1, 2020
It looks like there was a regression sometime between openml==0.11.0 and openml==0.10.2. Switching back to openml==0.10.2 fixes my problem, even with ubuntu 18.04, but others are still likely to run into this so it's probably worth fixing for other people.
joaquinvanschoren commentedon Nov 17, 2020
Hi Andy,
Sorry for the slow reply. I'm moving this issue to the openml-python tracker. They'll be able to check what's going with the install.
andyDoucette commentedon Nov 17, 2020
thanks.
PGijsbers commentedon Nov 17, 2020
According to the stack trace, one would expect it's due to changes in the README file. The changes are:
I suspect the ü (
<C3><BC>) in Müller is the culprit, as it is not included in ASCII but is in UTF-8. I don't know if just addingencoding='utf-8'as an argument toopenwould be sufficient. I'll look into it.PGijsbers commentedon Nov 17, 2020
I patched it and with the new docker file (replace the branchname with
developafter the PR is merged):it installs successfully. Note that I had to also install numpy through the regular repository because otherwise it raised some error.
andyDoucette commentedon Nov 18, 2020
PGijsbers commentedon Nov 19, 2020
And thank you for bringing it to our attention with the needed documentation to reproduce the issue 👍 especially for platform specific errors that makes a big difference!
andyDoucette commentedon Nov 19, 2020