Unix系统安装MySQL-python出现UnicodeDecodeError错误解决方法

今天装MySQL-python时候出现了这个错误:

    error: command 'gcc' failed with exit status 1  
      
    ----------------------------------------  
    Cleaning up...  
    Command /usr/bin/python -c "import setuptools;__file__='/tmp/pip_build_root/MySQL-python/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-TIlEQj-record/install-record.txt --single-version-externally-managed failed with error code 1 in /tmp/pip_build_root/MySQL-python  
    Traceback (most recent call last):  
      File "/usr/bin/pip", line 9, in <module>  
        load_entry_point('pip==1.4.1', 'console_scripts', 'pip')()  
      File "/usr/lib/python2.6/site-packages/pip/__init__.py", line 148, in main  
        return command.main(args[1:], options)  
      File "/usr/lib/python2.6/site-packages/pip/basecommand.py", line 169, in main  
        text = '\n'.join(complete_log)  
    UnicodeDecodeError: 'ascii' codec can't decode byte 0xe9 in position 20: ordinal not in range(128)  

经过搜索之后找到了解决办法,就是先安装Python-devel,然后再安装MySQL-python就可以了。

转载于:https://www.cnblogs.com/numbbbbb/p/3584451.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值