win下报错信息为:
ERROR: Command errored out with exit status 1:
command: ‘c:\users\dell\appdata\local\programs\python\python36\python.exe’ -c ‘import io, os, sys, setuptools, tokenize; sys.argv[0] = ‘"’"‘C:\Users\Dell\AppData\Local\Temp\pip-install-7zza8mj8\django-aliyun-oss2-storage_6fef8ae8dbb64c7fb6a8f52dc1c98bef\setup.py’"’"’; file=’"’"‘C:\Users\Dell\AppD
ata\Local\Temp\pip-install-7zza8mj8\django-aliyun-oss2-storage_6fef8ae8dbb64c7fb6a8f52dc1c98bef\setup.py’"’"’;f = getattr(tokenize, ‘"’"‘open’"’"’, open)(file) if os.path.exists(file) else io.StringIO(’"’"‘from setuptools import setup; setup()’"’"’);code = f.read().replace(’"’"’\r\n’"’"’, ‘"’"’\n’"’"’
);f.close();exec(compile(code, file, ‘"’"‘exec’"’"’))’ egg_info --egg-base ‘C:\Users\Dell\AppData\Local\Temp\pip-pip-egg-info-bethyr08’
cwd: C:\Users\Dell\AppData\Local\Temp\pip-install-7zza8mj8\django-aliyun-oss2-storage_6fef8ae8dbb64c7fb6a8f52dc1c98bef
Complete output (5 lines):
Traceback (most recent call last):
File “”, line 1, in
File “C:\Users\Dell\AppData\Local\Temp\pip-install-7zza8mj8\django-aliyun-oss2-storage_6fef8ae8dbb64c7fb6a8f52dc1c98bef\setup.py”, line 5, in
README = readme.read()
UnicodeDecodeError: ‘gbk’ codec can’t decode byte 0x91 in position 63: illegal multibyte sequence
错误为:gbk decodeerror
setup.py”, line 5, in README = readme.read()
UnicodeDecodeError: ‘gbk’ codec can’t decode byte 0x91 in position 63: illegal multibyte sequence
查看setup.py文件 line 5: 默认decode
with open(os.path.join(os.path.dirname(file),‘README.md’)) as readme:
README = readme.read()
尝试指定:encoding="utf8”
with open(os.path.join(os.path.dirname(file),‘README.md’),encoding="utf8”) as readme:
README = readme.read()
手动安装:
python setup.py install
安装成功:
Finished processing dependencies for django-aliyun-oss2-storage==0.1.5