【发布时间】:2020-07-03 15:48:11
【问题描述】:
这是一个 Django 项目。
在本地 virtualenv 中运行 pip install -r requirements.txt 时遇到错误。
Collecting https://github.com/jedestep/Zappa/archive/layer-support.zip (from -r requirements\base.txt (line 9))
Using cached https://github.com/jedestep/Zappa/archive/layer-support.zip
ERROR: Command errored out with exit status 1:
command: 'c:\users\user~1\desktop\project\project\venv\scripts\python.exe' -c 'import sys, setuptools, tokenize
; sys.argv[0] = '"'"'C:\\Users\\USER~1\\AppData\\Local\\Temp\\pip-req-build-6htw2gh2\\setup.py'"'"'; __file__='"'"'C:\
\Users\\USER~1\\AppData\\Local\\Temp\\pip-req-build-6htw2gh2\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(
__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' e
gg_info --egg-base 'C:\Users\USER~1\AppData\Local\Temp\pip-req-build-6htw2gh2\pip-egg-info'
cwd: C:\Users\USER~1\AppData\Local\Temp\pip-req-build-6htw2gh2\
Complete output (7 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\USER~1\AppData\Local\Temp\pip-req-build-6htw2gh2\setup.py", line 8, in <module>
long_description = readme_file.read()
File "c:\users\user~1\desktop\project\project\venv\lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 73776: character maps to <undefined>
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
要求确实在 vagrant 环境中按预期安装,但是我记得它也可以在我的机器上本地工作。不幸的是,我不确定导致此错误的更改是什么,它可能是拉动的结果。
版本:
Python: 3.6.5
Django: 2.2
pip: 20.0.2
我已经运行了pip install --upgrade setuptools,但它并没有改变错误。
当我尝试运行tox 时,自动测试数据库下载会出现类似的错误。
任何想法将不胜感激。 谢谢。
【问题讨论】: