【python】-- 安装 xadmin错误:"UnicodeDecodeError: 'gbk' codec can't decode byte 0xa4 in position 3444"

来源:互联网 发布:苹果手机照片导入mac 编辑:程序博客网 时间:2024/06/05 16:40

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

C:\WINDOWS\system32>pip install xadminCollecting 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.zipProcessing xadmin-master.zipRequirement 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.whlCollecting django-reversion>=2.0.0 (from xadmin==0.6.1)  Using cached django_reversion-2.0.8-py2.py3-none-any.whlCollecting django-formtools>=1.0 (from xadmin==0.6.1)  Using cached django_formtools-2.0-py2.py3-none-any.whlCollecting httplib2==0.9.2 (from xadmin==0.6.1)  Using cached httplib2-0.9.2.zipRequirement 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 ... doneSuccessfully installed django-crispy-forms-1.6.1 django-formtools-2.0 django-reversion-2.0.8 httplib2-0.9.2 xadmin-0.6.1
1 0
原创粉丝点击