Urgently!!!!!! Update failed - Server Error (500)

pip install requests urllib3 pyOpenSSL --upgrade

DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won’t be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at Release process - pip documentation v22.0.dev0
Requirement already up-to-date: requests in /usr/lib/python2.7/site-packages (2.22.0)
Requirement already up-to-date: urllib3 in /usr/lib/python2.7/site-packages (1.25.7)
Requirement already up-to-date: pyOpenSSL in /usr/lib/python2.7/site-packages (19.1.0)
Requirement already satisfied, skipping upgrade: chardet<3.1.0,>=3.0.2 in /usr/lib/python2.7/site-packages (from requests) (3.0.4)
Requirement already satisfied, skipping upgrade: idna<2.9,>=2.5 in /usr/lib/python2.7/site-packages (from requests) (2.8)
Requirement already satisfied, skipping upgrade: certifi>=2017.4.17 in /usr/lib/python2.7/site-packages (from requests) (2019.11.28)
Requirement already satisfied, skipping upgrade: cryptography>=2.8 in /usr/lib64/python2.7/site-packages (from pyOpenSSL) (2.8)
Requirement already satisfied, skipping upgrade: six>=1.5.2 in /usr/lib/python2.7/site-packages (from pyOpenSSL) (1.13.0)
Requirement already satisfied, skipping upgrade: enum34; python_version < “3” in /usr/lib/python2.7/site-packages (from cryptography>=2.8->pyOpenSSL) (1.1.6)
Requirement already satisfied, skipping upgrade: cffi!=1.11.3,>=1.8 in /usr/lib64/python2.7/site-packages (from cryptography>=2.8->pyOpenSSL) (1.13.2)
Requirement already satisfied, skipping upgrade: ipaddress; python_version < “3” in /usr/lib/python2.7/site-packages (from cryptography>=2.8->pyOpenSSL) (1.0.23)
Requirement already satisfied, skipping upgrade: pycparser in /usr/lib/python2.7/site-packages (from cffi!=1.11.3,>=1.8->cryptography>=2.8->pyOpenSSL) (2.19)

Error:

Using cached https://files.pythonhosted.org/packages/70/8f/2c81fa9d57ab632902aa1a48b4186c7f79d1e1f5004fe1b7254da08df83c/jsonpatch-1.2.tar.gz
ERROR: Command errored out with exit status 1:
command: /usr/local/CyberCP/bin/python3 -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘"’"’/tmp/pip-install-kmes9uzc/jsonpatch/setup.py’"’"’; file=’"’"’/tmp/pip-install-kmes9uzc/jsonpatch/setup.py’"’"’;f=getattr(tokenize, ‘"’"‘open’"’"’, open)(file);code=f.read().replace(’"’"’\r
‘"’"’, ‘"’"’
‘"’"’);f.close();exec(compile(code, file, ‘"’"‘exec’"’"’))’ egg_info --egg-base /tmp/pip-install-kmes9uzc/jsonpatch/pip-egg-info
cwd: /tmp/pip-install-kmes9uzc/jsonpatch/
Complete output (7 lines):
Traceback (most recent call last):
File “”, line 1, in
File “/tmp/pip-install-kmes9uzc/jsonpatch/setup.py”, line 13, in
src = open(‘jsonpatch.py’).read()
File “/usr/local/CyberCP/lib64/python3.6/encodings/ascii.py”, line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: ‘ascii’ codec can’t decode byte 0xc3 in position 173: ordinal not in range(128)
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
–2020-01-04 15:39:15-- http://www.litespeedtech.com/packages/lsapi/wsgi-lsapi-1.4.tgz
Resolving www.litespeedtech.com (www.litespeedtech.com)… 52.55.120.73
Connecting to www.litespeedtech.com (www.litespeedtech.com)|52.55.120.73|:80… connected.
HTTP request sent, awaiting response… 200 OK
Length: 47890 (47K) [application/x-gtar]
Saving to: ‘wsgi-lsapi-1.4.tgz’

Error when I enable debug:

OperationalError at /
(2003, 'Can\‘t connect to MySQL server on \‘127.0.0.1\’ (111 “Connection refused”)’)
Request Method: GET
Request URL: https://IP:8090/
Django Version: 1.11
Exception Type: OperationalError
Exception Value:
(2003, 'Can\‘t connect to MySQL server on \‘127.0.0.1\’ (111 “Connection refused”)’)
Exception Location: /usr/lib64/python2.7/site-packages/MySQLdb/connections.py in init, line 193
Python Executable: /usr/local/CyberCP/bin/python
Python Version: 2.7.5

Are you trying the new guide available at → Upgrading CyberPanel - CyberPanel

CyberPanel use Python 3 now.