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

Installing pip-tools from source gives UnicodeDecodeError #815

Closed
AbdealiLoKo opened this issue May 13, 2019 · 1 comment · Fixed by #816
Closed

Installing pip-tools from source gives UnicodeDecodeError #815

AbdealiLoKo opened this issue May 13, 2019 · 1 comment · Fixed by #816

Comments

@AbdealiLoKo
Copy link
Contributor

When I install pip-tools with source, it fails with an ascii codec error.
It works if I install it with the wheel.

Environment Versions
  1. OS Type CentOS 7
  2. Python version: Python 3.6.6
  3. pip version: pip 8.1.2 from /usr/lib/python3.6/site-packages (python 3.6)
  4. pip-tools version: NA
Steps to replicate
$ docker run -it --rm centos:7 bash
# yum install -y epel-release
...
# yum install -y python36-pip
...
# pip3.6 install --no-binary :all: pip-tools==3.5.0
Collecting pip-tools==3.5.0
  Downloading https://files.pythonhosted.org/packages/38/03/4d9d73e1bb18920cace97b1e39889129fd3aeec9c10cbef462c92dd4531d/pip-tools-3.5.0.tar.gz (96kB)
    100% |################################| 102kB 312kB/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-xhh_fcip/pip-tools/setup.py", line 20, in <module>
        long_description=read_file('README.rst'),
      File "/tmp/pip-build-xhh_fcip/pip-tools/setup.py", line 10, in read_file
        return thefile.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 7532: ordinal not in range(128)

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-xhh_fcip/pip-tools/
You are using pip version 8.1.2, however version 19.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Expected result

Should have installed

Actual result

Failed to install

@atugushev
Copy link
Member

FTR, it could be fixed by adding encoding="utf8" to

with open(join(abspath(dirname(__file__)), filename)) as thefile:

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

Successfully merging a pull request may close this issue.

2 participants