ホームページ  >  に質問  >  本文

python - pip安装django-xadmin时出现了字符编码问题

我想用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_leeringa_lee2741日前862

全員に返信(2)返信します

  • PHP中文网

    PHP中文网2017-04-18 09:17:01

    ファイルのエンコードの問題。README.rst ファイルの値は影響しません。README.rst ファイルのエンコードを変更するか、実際に内容をクリアしてみてください。

    返事
    0
  • 巴扎黑

    巴扎黑2017-04-18 09:17:01

    README.rst このファイルは GBK にエンコードされて保存され、PYthon setup.pu install でインストールされます

    返事
    0
  • キャンセル返事