zoukankan      html  css  js  c++  java
  • 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('
    ', '
    '), __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 = '
    '.join(complete_log)  
        UnicodeDecodeError: 'ascii' codec can't decode byte 0xe9 in position 20: ordinal not in range(128)  

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

  • 相关阅读:
    python之切片
    python之递归函数
    python之函数的参数
    python之定义函数
    python函数之调用函数
    小地图
    利用脚本对游戏对象进行操作
    Unity中www的基本应用
    U3D脚本开发基础
    U3D游戏开发基础
  • 原文地址:https://www.cnblogs.com/numbbbbb/p/3584451.html
Copyright © 2011-2022 走看看