错误:
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 1025: ordinal not in range(128)
ERROR: Exception:
Traceback (most recent call last):File "/usr/local/lib/python3.6/dist-packages/pip/_internal/cli/base_command.py", line 224, in _mainstatus = self.run(options, args)File "/usr/local/lib/python3.6/dist-packages/pip/_internal/cli/req_command.py", line 180, in wrapperreturn func(self, options, args)File "/usr/local/lib/python3.6/dist-packages/pip/_internal/commands/install.py", line 249, in runisolated_mode=options.isolated_mode,File "/usr/local/lib/python3.6/dist-packages/pip/_internal/commands/install.py", line 651, in decide_user_installif site_packages_writable(root=root_path, isolated=isolated_mode):File "/usr/local/lib/python3.6/dist-packages/pip/_internal/commands/install.py", line 596, in site_packages_writableget_lib_location_guesses(root=root, isolated=isolated))File "/usr/local/lib/python3.6/dist-packages/pip/_internal/commands/install.py", line 588, in get_lib_location_guessesisolated=isolated, prefix=prefix)File "/usr/local/lib/python3.6/dist-packages/pip/_internal/locations.py", line 108, in distutils_schemed.parse_config_files()File "/usr/lib/python3.6/distutils/dist.py", line 401, in parse_config_filesparser.read(filename)File "/usr/lib/python3.6/configparser.py", line 697, in readself._read(fp, filename)File "/usr/lib/python3.6/configparser.py", line 1015, in _readfor lineno, line in enumerate(fp, start=1):File "/usr/lib/python3.6/encodings/ascii.py", line 26, in decodereturn codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 1025: ordinal not in range(128)
解决方法:
1、 卸载pipapt remove python3-pip
apt remove python-pip
cd /usr/local/lib/python3.6/dist-packages
sudo rm -rf pip2、重装pippython -m pip install --upgrade pip -i https://pypi.mirrors.ustc.edu.cn/simple