UnicodeEncodeError: 'ascii' codec can't encode characters in position 9-14: ordinal not in range(128

来源:互联网 发布:淘宝u站报名 编辑:程序博客网 时间:2024/05/17 19:59

这里写图片描述

C:\Windows\system32>pip install redisCollecting redisC:\Program Files\Python2.7\lib\site-packages\pip-9.0.1-py2.7.egg\pip\_vendor\requests\packages\urllib3\util\ssl_.py:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#snimissingwarning.  SNIMissingWarningC:\Program Files\Python2.7\lib\site-packages\pip-9.0.1-py2.7.egg\pip\_vendor\requests\packages\urllib3\util\ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.  InsecurePlatformWarning  Downloading redis-2.10.5-py2.py3-none-any.whl (60kB)Exception:Traceback (most recent call last):  File "C:\Program Files\Python2.7\lib\site-packages\pip-9.0.1-py2.7.egg\pip\basecommand.py", line 215, in main    status = self.run(options, args)  File "C:\Program Files\Python2.7\lib\site-packages\pip-9.0.1-py2.7.egg\pip\commands\install.py", line 324, in run    requirement_set.prepare_files(finder)  File "C:\Program Files\Python2.7\lib\site-packages\pip-9.0.1-py2.7.egg\pip\req\req_set.py", line 380, in prepare_files    ignore_dependencies=self.ignore_dependencies))  File "C:\Program Files\Python2.7\lib\site-packages\pip-9.0.1-py2.7.egg\pip\req\req_set.py", line 620, in _prepare_file    session=self.session, hashes=hashes)  File "C:\Program Files\Python2.7\lib\site-packages\pip-9.0.1-py2.7.egg\pip\download.py", line 821, in unpack_url    hashes=hashes  File "C:\Program Files\Python2.7\lib\site-packages\pip-9.0.1-py2.7.egg\pip\download.py", line 659, in unpack_http_url    hashes)  File "C:\Program Files\Python2.7\lib\site-packages\pip-9.0.1-py2.7.egg\pip\download.py", line 882, in _download_http_url    _download_url(resp, link, content_file, hashes)  File "C:\Program Files\Python2.7\lib\site-packages\pip-9.0.1-py2.7.egg\pip\download.py", line 603, in _download_url    hashes.check_against_chunks(downloaded_chunks)  File "C:\Program Files\Python2.7\lib\site-packages\pip-9.0.1-py2.7.egg\pip\utils\hashes.py", line 46, in check_against_chunks    for chunk in chunks:  File "C:\Program Files\Python2.7\lib\site-packages\pip-9.0.1-py2.7.egg\pip\download.py", line 571, in written_chunks    for chunk in chunks:  File "C:\Program Files\Python2.7\lib\site-packages\pip-9.0.1-py2.7.egg\pip\utils\ui.py", line 141, in iter    self.next(n)  File "C:\Program Files\Python2.7\lib\site-packages\pip-9.0.1-py2.7.egg\pip\_vendor\progress\__init__.py", line 73, in next    self.update()  File "C:\Program Files\Python2.7\lib\site-packages\pip-9.0.1-py2.7.egg\pip\_vendor\progress\bar.py", line 79, in update    self.writeln(line)  File "C:\Program Files\Python2.7\lib\site-packages\pip-9.0.1-py2.7.egg\pip\_vendor\progress\helpers.py", line 68, in writeln    print(line, end='', file=self.file)  File "C:\Program Files\Python2.7\lib\site-packages\pip-9.0.1-py2.7.egg\pip\_vendor\colorama\ansitowin32.py", line 141, in write    self.write_and_convert(text)  File "C:\Program Files\Python2.7\lib\site-packages\pip-9.0.1-py2.7.egg\pip\_vendor\colorama\ansitowin32.py", line 169, in write_and_convert    self.write_plain_text(text, cursor, len(text))  File "C:\Program Files\Python2.7\lib\site-packages\pip-9.0.1-py2.7.egg\pip\_vendor\colorama\ansitowin32.py", line 174, in write_plain_text    self.wrapped.write(text[start:end])UnicodeEncodeError: 'ascii' codec can't encode characters in position 9-14: ordinal not in range(128)

今天使用 pip install 的时候报错,

按道理讲的话,使用管理员身份命令行运行 pip 命令不应该报错的啊

于是乎突然想起 pycharm 里有一个程序好像好在运行

遂关掉程序

ok

阅读全文
0 0
原创粉丝点击