[root@iZ8vbi9ldypntZ api]# pip install -r requirements.txt
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Looking in indexes: https://mirrors.aliyun.com/pypi/simple
Requirement already satisfied: requests in /usr/lib/python2.7/site-packages (from -r requirements.txt (line 1)) (2.23.0)
Collecting lxml
Using cached https://mirrors.aliyun.com/pypi/packages/7a/ac/e5caaa241de06024766872714c38d14e5f885dc453a4b8f9e6463b67c164/lxml-4.5.1-cp27-cp27mu-manylinux1_x86_64.whl (5.5 MB)
Collecting BeautifulSoup4
Using cached https://mirrors.aliyun.com/pypi/packages/c2/39/1efce3dc73e657c43f436533d49be1491bf8fc830caa70188d73bfd03b8d/beautifulsoup4-4.9.1-py2-none-any.whl (111 kB)
Collecting uvicorn
Using cached https://mirrors.aliyun.com/pypi/packages/9a/dd/8be4cdd599dafb69c1a2a2427eec14b218d9fc047cb0fd41060afc2852a8/uvicorn-0.11.5.tar.gz (29 kB)
ERROR: Command errored out with exit status 1:
command: /usr/bin/python2 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-hSyTdu/uvicorn/setup.py'"'"'; file='"'"'/tmp/pip-install-hSyTdu/uvicorn/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-f96xgj
cwd: /tmp/pip-install-hSyTdu/uvicorn/
Complete output (7 lines):
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-install-hSyTdu/uvicorn/setup.py", line 56, in
version=get_version("uvicorn"),
File "/tmp/pip-install-hSyTdu/uvicorn/setup.py", line 15, in get_version
init_py = open(path, "r", encoding="utf8").read()
TypeError: 'encoding' is an invalid keyword argument for this function
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
求救大佬们。