一.常用命令
python -m pip install --upgrade pip 更新我们的pip
二.关于xadmin的安装,以下命令可用,django3,python3.7
pip install https://codeload.github.com/sshwsfc/xadmin/zip/django2
三、一些问题
1.发现xadmin不支持django3,因为django3已经去掉了six models,而xadmin还加载了,还是把django改为版本2.2吧
pip install django == 2.2
2.UnicodeDecodeError: ‘gbk’ codec can’t decode byte 0xa6 in position 9737: illegal multibyte sequence
打开django/views下的debug.py文件,转到line331行:
with Path(CURRENT_DIR, ‘templates’, ‘technical_500.html’).open() as fh
将其改成:
with Path(CURRENT_DIR, ‘templates’, ‘technical_500.html’).open(encoding=”utf-8″) as fh