推荐学习书目
› Learn Python the Hard Way
Python Sites
› PyPI - Python Package Index
› http://diveintopython.org/toc/index.html
› Pocoo
值得关注的项目
› PyPy
› Celery
› Jinja2
› Read the Docs
› gevent
› pyenv
› virtualenv
› Stackless Python
› Beautiful Soup
› 结巴中文分词
› Green Unicorn
› Sentry
› Shovel
› Pyflakes
› pytest
Python 编程
› pep8 Checker
Styles
› PEP 8
› Google Python Style Guide
› Code Style from The Hitchhiker's Guide
chenguoyu
V2EX  ›  Python

python 安装第三方库的时候出现的问题,求助

  •  
  •   chenguoyu · Oct 23, 2016 · 27970 views
    This topic created in 3677 days ago, the information mentioned may be changed or developed.
    UnicodeDecodeError: 'ascii' codec can't decode byte 0xb3 in position 9: ordinal not in range(128)



    Try to run this command from the system terminal. Make sure that you use the correct version of 'pip' installed for your Python interpreter located at 'C:\Python27\python.exe'.



    Collecting pip==8.1.2

    You are using pip version 7.1.0, however version 8.1.2 is available.
    You should consider upgrading via the 'python -m pip install --upgrade pip' command.
    C:\Python27\lib\site-packages\pip-7.1.0-py2.7.egg\pip\_vendor\requests\packages\urllib3\util\ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
    InsecurePlatformWarning
    The repository located at pypi.douban.com is not a trusted or secure host and is being ignored. If this repository is available via HTTPS it is recommended to use HTTPS instead, otherwise you may silence this warning and allow it anyways with '--trusted-host pypi.douban.com'.
    Exception:
    Traceback (most recent call last):
    File "C:\Python27\lib\site-packages\pip-7.1.0-py2.7.egg\pip\basecommand.py", line 223, in main
    status = self.run(options, args)
    File "C:\Python27\lib\site-packages\pip-7.1.0-py2.7.egg\pip\commands\install.py", line 282, in run
    requirement_set.prepare_files(finder)
    File "C:\Python27\lib\site-packages\pip-7.1.0-py2.7.egg\pip\req\req_set.py", line 334, in prepare_files
    functools.partial(self._prepare_file, finder))
    File "C:\Python27\lib\site-packages\pip-7.1.0-py2.7.egg\pip\req\req_set.py", line 321, in _walk_req_to_install
    more_reqs = handler(req_to_install)
    File "C:\Python27\lib\site-packages\pip-7.1.0-py2.7.egg\pip\req\req_set.py", line 491, in _prepare_file
    session=self.session)
    File "C:\Python27\lib\site-packages\pip-7.1.0-py2.7.egg\pip\download.py", line 825, in unpack_url
    session,
    File "C:\Python27\lib\site-packages\pip-7.1.0-py2.7.egg\pip\download.py", line 673, in unpack_http_url
    from_path, content_type = _download_http_url(link, session, temp_dir)
    File "C:\Python27\lib\site-packages\pip-7.1.0-py2.7.egg\pip\download.py", line 884, in _download_http_url
    file_path = os.path.join(temp_dir, filename)
    File "C:\Python27\lib\ntpath.py", line 108, in join
    path += "\\" + b
    UnicodeDecodeError: 'ascii' codec can't decode byte 0xb3 in position 9: ordinal not in range(128)
    5 replies  •  2016-10-24 11:42:24 +08:00
    guyskk
    guyskk
    Oct 24, 2016
    1
    你的 Windows 用户名是不是中文?
    Trim21
    Trim21
    Oct 24, 2016 via Android
    2
    可能需要先 chcp 65001 。。。
    coreki
    coreki
    Oct 24, 2016 via iPhone
    3
    检查输出目标编码
    chenguoyu
    chenguoyu
    OP
    Oct 24, 2016
    4
    @guyskk 需要改成英文是吗
    guyskk
    guyskk
    Oct 24, 2016 via Android
    5
    @chenguoyu 是的
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1004 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 40ms · UTC 22:05 · PVG 06:05 · LAX 14:05 · JFK 17:05
    ♥ Do have faith in what you're doing.