我尝试在Mac OS X Mavericks上通过pip安装Argh-0.24.1,但我收到了ascii解码错误。这是追溯:
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
有什么想法吗?
答案 0 :(得分:2)
快速搜索后this link为我提供了第一条线索,说明为什么会出现这种麻烦。
您的终端似乎在您的pip安装时强制执行不兼容的区域设置。
要解决此问题,只需编辑〜/ .bash_profile :
~: nano ~/.bash_profile
然后添加以下行:
# Setting for the new UTF-8 terminal support in Lion
export LC_CTYPE=en_US.UTF-8
export LC_ALL=en_US.UTF-8
注意:如果文件不存在,只需创建它。
现在关闭终端,再次打开它,然后重试安装。