python3安装xadmin出现 UnicodeDecodeError: 'gbk' codec can't decode byte 0xa4 in position 3444

在学习 Django 时,需要安装 xadmin ,结果出现了一下错误

C:\WINDOWS\system32>pip install xadmin
Collecting xadmin
  Using cached xadmin-0.6.1.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\pinsily\AppData\Local\Temp\pip-build-xzvebsss\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\pinsily\AppData\Local\Temp\pip-build-xzvebsss\xadmin\


网上搜索了一下,说是 python3 不支持 xadmin,结果还是找到了解决的方法

从错误中可以看到,是文件README.rst 出现了 Unicode 解码错误,这个文件时没有什么用处的,可以新建一个同名的空白文件替换掉

下载 zip 安装包 
https://github.com/sshwsfc/xadmin 

è¿éåå¾çæè¿°

新建空白文件README.rst 压缩进 zip 中替换掉同名文件

è¿éåå¾çæè¿°

使用管理员命令行界面进行安装

C:\WINDOWS\system32>pip install xadmin-master.zip
Processing xadmin-master.zip
Requirement already satisfied: setuptools in c:\program files (x86)\python36-32\lib\site-packages (from xadmin==0.6.1)
Requirement already satisfied: django<2.0.0,>=1.9.0 in c:\program files (x86)\python36-32\lib\site-packages (from xadmin==0.6.1)
Collecting django-crispy-forms>=1.6.0 (from xadmin==0.6.1)
  Using cached django_crispy_forms-1.6.1-py2.py3-none-any.whl
Collecting django-reversion>=2.0.0 (from xadmin==0.6.1)
  Using cached django_reversion-2.0.8-py2.py3-none-any.whl
Collecting django-formtools>=1.0 (from xadmin==0.6.1)
  Using cached django_formtools-2.0-py2.py3-none-any.whl
Collecting httplib2==0.9.2 (from xadmin==0.6.1)
  Using cached httplib2-0.9.2.zip
Requirement already satisfied: pytz in c:\program files (x86)\python36-32\lib\site-packages (from django<2.0.0,>=1.9.0->xadmin==0.6.1)
Installing collected packages: django-crispy-forms, django-reversion, django-formtools, httplib2, xadmin
  Running setup.py install for httplib2 ... done
  Running setup.py install for xadmin ... done
Successfully installed django-crispy-forms-1.6.1 django-formtools-2.0 django-reversion-2.0.8 httplib2-0.9.2 xadmin-0.6.1

发布了255 篇原创文章 · 获赞 471 · 访问量 109万+

猜你喜欢

转载自blog.csdn.net/knockheart/article/details/100894215