Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'pip install' fails with "TypeError: 'encoding' is an invalid keyword argument for this function" #60

Open
130s opened this issue Oct 22, 2021 · 0 comments

Comments

@130s
Copy link

130s commented Oct 22, 2021

With Py2 on Ubuntu 18.04 I get this.

$ docker pull ubuntu:bionic 
bionic: Pulling from library/ubuntu
Digest: sha256:0fedbd5bd9fb72089c7bbca476949e10593cebed9b1fb9edf5b79dbbacddd7d6
Status: Image is up to date for ubuntu:bionic
docker.io/library/ubuntu:bionic

$ docker run -it ubuntu:bionic bash

root@649f8291c2e8:/# apt update && apt install -y python-pip && pip install ruyaml
Collecting ruyaml
  Downloading https://files.pythonhosted.org/packages/a0/cf/6fd65b5fcca95ecde2f26f71709ee02ab305487327cc4b08522399179883/ruyaml-0.19.0.tar.gz (226kB)
    100% |################################| 235kB 2.8MB/s 
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-TPl3zQ/ruyaml/setup.py", line 3, in <module>
        LONG_DESC = open("README.rst", encoding="utf-8").read()
    TypeError: 'encoding' is an invalid keyword argument for this function
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-TPl3zQ/ruyaml/

But Py3 seems to be ok on 18.04.

$ docker run -it ubuntu:bionic bash

# apt update && apt install -y python3-pip && pip3 install ruyaml

Processing triggers for ca-certificates (20210119~18.04.2) ...
Updating certificates in /etc/ssl/certs...
0 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...
done.
Collecting ruyaml
  Downloading https://files.pythonhosted.org/packages/7d/9a/ec93200953ae3e8687ad6ad962d7a3ad306fc81048e6ed3dcb350be7786c/ruyaml-0.20.0-py2.py3-none-any.whl (96kB)
    100% |################################| 102kB 2.4MB/s 
Collecting distro>=1.3.0 (from ruyaml)
  Downloading https://files.pythonhosted.org/packages/b3/8d/a0a5c389d76f90c766e956515d34c3408a1e18f60fbaa08221d1f6b87490/distro-1.6.0-py2.py3-none-any.whl
Requirement already satisfied: setuptools>=39.0 in /usr/lib/python3/dist-packages (from ruyaml)
Installing collected packages: distro, ruyaml
Successfully installed distro-1.6.0 ruyaml-0.20.0
Btw on Focal with Python3, this doesn't happen either.
root@d2484b1ee0a7:/# pip3 install ruyaml
Collecting ruyaml
  Downloading ruyaml-0.20.0-py2.py3-none-any.whl (96 kB)
     |████████████████████████████████| 96 kB 2.9 MB/s 
Collecting distro>=1.3.0
  Downloading distro-1.6.0-py2.py3-none-any.whl (19 kB)
Requirement already satisfied: setuptools>=39.0 in /usr/lib/python3/dist-packages (from ruyaml) (45.2.0)
Installing collected packages: distro, ruyaml
Successfully installed distro-1.6.0 ruyaml-0.20.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant