无法安装Bcrypt,引发了UnicodeDecodeError

时间:2014-09-25 13:09:31

标签: python security bcrypt

当我用pip安装Bcrypt时会出现错误:

distutils.errors.DistutilsError: Setup script exited with error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_root/Bcrypt
Traceback (most recent call last):
  File "/usr/bin/pip", line 9, in <module>
    load_entry_point('pip==1.5.4', 'console_scripts', 'pip')()
  File "/usr/lib/python2.7/dist-packages/pip/__init__.py", line 185, in main
    return command.main(cmd_args)
  File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 161, in main
    text = '\n'.join(complete_log)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe6 in position 51: ordinal not in range(128)

有什么想法吗?感谢。

1 个答案:

答案 0 :(得分:0)

可能pip无法处理终端的语言环境。您可以尝试使用此

设置区域设置
export LC_ALL="en_US.UTF-8"

然后再次尝试安装。