2

I am trying to install awsebcli in a virtualenv like this:

pip install awsebcli --upgrade --user

Installation fails with the following error:

 Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-dpxu8m6m/awsebcli/setup.py", line 48, in <module>
        long_description=open('README.rst').read() + open('CHANGES.rst').read(),
      File "/home/rashik/Documents/Bhalo/python/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 7198: ordinal not in range(128)

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-dpxu8m6m/awsebcli/

I am using arch linux. I have these packages installed in my virtualenv:

awscli           1.15.66  
blessed          1.15.0   
botocore         1.10.65  
cement           2.10.12  
certifi          2018.4.16
chardet          3.0.4    
colorama         0.3.9    
docker-py        1.10.6   
docker-pycreds   0.3.0    
dockerpty        0.4.1    
docopt           0.6.2    
docutils         0.14     
idna             2.7      
jmespath         0.9.3    
pathspec         0.5.6    
pip              18.0     
pyasn1           0.4.4    
python-dateutil  2.7.3    
PyYAML           3.13     
requests         2.19.1   
rsa              3.4.2    
s3transfer       0.1.13   
semantic-version 2.6.0    
setuptools       40.0.0   
six              1.11.0   
texttable        1.4.0    
urllib3          1.23     
wcwidth          0.1.7    
websocket-client 0.48.0   
wheel            0.31.1 

Note: None of the answers for this question-PIP Install Numpy throws an error "ascii codec can't decode byte 0xe2" works for me.

Rashik
  • 1,014
  • 2
  • 16
  • 36
  • 1
    Possible duplicate of [PIP Install Numpy throws an error "ascii codec can't decode byte 0xe2"](https://stackoverflow.com/questions/26473681/pip-install-numpy-throws-an-error-ascii-codec-cant-decode-byte-0xe2) – hoefling Jul 27 '18 at 17:40
  • 1
    As @hoefling points out, specifically, I think, [this response](https://stackoverflow.com/questions/26473681/pip-install-numpy-throws-an-error-ascii-codec-cant-decode-byte-0xe2#answer-31573180) is the solution. – progfan Jul 27 '18 at 17:49
  • @hoefling-That one is for numpy and ubuntu. – Rashik Jul 27 '18 at 17:49
  • @progfan-LC_ALL=C did not work for me. – Rashik Jul 27 '18 at 18:00
  • 1
    @Rashik it's not about the OS or the package, it's about your locales setup. The error means that your system does not recognize some UTF-8 characters in the package's `CHANGES.rst` file. What is your output of the `locale` command? – hoefling Jul 27 '18 at 18:07
  • 1
    locale: Cannot set LC_CTYPE to default locale: No such file or directory locale: Cannot set LC_MESSAGES to default locale: No such file or directory locale: Cannot set LC_ALL to default locale: No such file or directory LANG=en_US.UTF-8 LC_CTYPE="en_US.UTF-8" LC_NUMERIC="en_US.UTF-8" LC_TIME="en_US.UTF-8" LC_COLLATE="en_US.UTF-8" LC_MONETARY="en_US.UTF-8" LC_MESSAGES="en_US.UTF-8" LC_PAPER="en_US.UTF-8" LC_NAME="en_US.UTF-8" LC_ADDRESS="en_US.UTF-8" LC_TELEPHONE="en_US.UTF-8" LC_MEASUREMENT="en_US.UTF-8" LC_IDENTIFICATION="en_US.UTF-8" LC_ALL= – Rashik Jul 27 '18 at 18:20
  • @hoefling Here you go. – Rashik Jul 27 '18 at 18:21
  • 2
    Your system does not have locale configured correctly. You should resolve the locale issue, Arch has a good wiki article for this: [Locale](https://wiki.archlinux.org/index.php/locale). As for the temporary workaround, `export LC_ALL="en_US.UTF-8"` should help. – hoefling Jul 27 '18 at 18:33
  • @hoefling Do I add the line to my locale.conf file? – Rashik Jul 27 '18 at 20:09
  • 1
    No, just run the line from the terminal, then try installing `awsebcli` again. – hoefling Jul 27 '18 at 20:30
  • @hoefling Still getting the same error. – Rashik Jul 27 '18 at 20:34
  • en_US.UTF-8 is uncommented in my locale.gen file. – Rashik Jul 27 '18 at 20:40

1 Answers1

0

Using a virtualenv with only python2 helped.

Rashik
  • 1,014
  • 2
  • 16
  • 36