Domanda

I'm trying to install Argh-0.24.1 via pip on Mac OS X Mavericks but I'm getting a ascii decode error. Here is the traceback:

eos87@local ~> pip install argh        
Downloading/unpacking argh
  Downloading argh-0.24.1.tar.gz
  Running setup.py egg_info for package argh
    Traceback (most recent call last):
      File "<string>", line 16, in <module>
      File "/Users/eos87/.virtualenvs/myenv/lib/python3.2/encodings/ascii.py", line 26, in decode
        return codecs.ascii_decode(input, self.errors)[0]
    UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 55: ordinal not in range(128)
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

  File "<string>", line 16, in <module>

  File "/Users/eos87/.virtualenvs/myenv/lib/python3.2/encodings/ascii.py", line 26, in decode

    return codecs.ascii_decode(input, self.errors)[0]

UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 55: ordinal not in range(128)

----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /Users/eos87/.virtualenvs/myenv/build/argh
Storing complete log in /Users/eos87/.pip/pip.log

Any ideas?

È stato utile?

Soluzione

After a quick search this link provided me with the first clue as to why this trouble is arising.

It seems your terminal is enforcing an incompatible locale upon your pip installation.

To fix this simply edit ~/.bash_profile:

~: nano ~/.bash_profile

Then add these lines:

# Setting for the new UTF-8 terminal support in Lion
export LC_CTYPE=en_US.UTF-8
export LC_ALL=en_US.UTF-8

NOTE: if the file doesn't exist, simply create it.

Now close your terminal, open it again, and retry the installation.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top