UnicodeDecodeError:'charmap'编解码器无法解码位置73776中的字节0x81

问题描述 投票:0回答:1

这是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.

这些要求确实在无所事事的环境中按预期的方式安装,但是我记得它也可以在我的计算机上本地运行。不幸的是,我不确定导致此错误的更改是什么,它可能是拉动的结果。

版本:Python: 3.6.5Django: 2.2pip: 20.0.2

我已经运行pip install --upgrade setuptools,但它不会更改错误。当我尝试运行tox时,自动测试数据库下载也会发生类似的错误。

任何想法都将不胜感激。谢谢。

这是Django项目。在本地virtualenv中运行pip install -r requirements.txt时遇到错误。收集https://github.com/jedestep/Zappa/archive/layer-support.zip(从-r ...

python django pip egg
1个回答
0
投票

这些要求确实在无所事事的环境中按预期的方式安装,但是我记得它也可以在我的计算机上本地运行。不幸的是,我不确定导致此错误的更改是什么,它可能是拉动的结果。

© www.soinside.com 2019 - 2024. All rights reserved.