python - pip安装django-xadmin时出现了字符编码问题
ringa_lee
ringa_lee 2017-04-18 09:15:01
[Python讨论组]

我想用pip安装一个django的xadmin组件。

django-xadmin的一些资料:docs github 官网

控制台里的报错:

C:\Windows\system32>pip install xadmin
Collecting xadmin
  Downloading xadmin-0.6.1.tar.gz (1.0MB)
    100% |████████████████████████████████| 1.0MB 329kB/s
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\Hao\AppData\Local\Temp\pip-build-m7x6g0ti\xadmin\setup.py", line 11, in <module>
        long_description=open('README.rst').read(),
    UnicodeDecodeError: 'gbk' codec can't decode byte 0xa4 in position 3444: illegal multibyte sequence

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\Hao\AppData\Local\Temp\pip-build-m7x6g0ti\xadmin\

我的环境是:
Python 3.5.2
windows10
django 1.9

看这句报错的意思UnicodeDecodeError: 'gbk' codec can't decode byte 0xa4 in position 3444: illegal multibyte sequence,似乎是字符编码出了问题。。?

请问该如何解决啊

ringa_lee
ringa_lee

ringa_lee

全部回复(2)
PHP中文网

文件编码问题,README.rst这个文件里面的值没什么作用,你可以尝试改变README.rst文件的编码,或是真接把里面的内容清空

巴扎黑

README.rst 这个文件改编码成GBK保存,然后用PYthon setup.pu install 安装

热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 意见反馈 讲师合作 广告合作 最新更新 English
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号