我无法为 python 安装“httpclient”

Pha*_*ove 2 python httpclient

我的操作系统是 Windows7 32 位 & 我使用 VScode 和 python 3.6 32 位

当我尝试时

C:\python>pip 安装客户端

Collecting httpclient
  Using cached httpclient-0.0.2.zip
    Complete output from command python setup.py egg_info:
    Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0.6.19.tar.gz
    Extracting in C:\Users\Public\Documents\ESTsoft\CreatorTemp\tmptrynwiem
    Traceback (most recent call last):
      File "C:\Users\Public\Documents\ESTsoft\CreatorTemp\pip-build-b7pgq1re\httpclient\distribute_setup.py", line 143, in use_setuptools

        raise ImportError
    ImportError

    During handling of the above exception, another exception occurred:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\Public\Documents\ESTsoft\CreatorTemp\pip-build-b7pgq1re\httpclient\setup.py", line 13, in <module>
        use_setuptools()
      File "C:\Users\Public\Documents\ESTsoft\CreatorTemp\pip-build-b7pgq1re\httpclient\distribute_setup.py", line 145, in use_setuptools
        return _do_download(version, download_base, to_dir, download_delay)
      File "C:\Users\Public\Documents\ESTsoft\CreatorTemp\pip-build-b7pgq1re\httpclient\distribute_setup.py", line 125, in _do_download_build_egg(egg, tarball, to_dir)
      File "C:\Users\Public\Documents\ESTsoft\CreatorTemp\pip-build-b7pgq1re\httpclient\distribute_setup.py", line 99, in _build_egg_extractall(tar)
      File "C:\Users\Public\Documents\ESTsoft\CreatorTemp\pip-build-b7pgq1re\httpclient\distribute_setup.py", line 467, in _extractallself.chown(tarinfo, dirpath)
    TypeError: chown() missing 1 required positional argument: 'numeric_owner'
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\Public\Documents\ESTsoft\CreatorTemp\pip-build-b7pgq1re\httpclient\
Run Code Online (Sandbox Code Playgroud)

Say*_*ane 5

httplib模块在 Python 3 中已重命名为http.client。在 python 3 中不需要安装。http.client它是预安装的。因此直接将其导入到您的脚本中,如下所示:

import http.client
Run Code Online (Sandbox Code Playgroud)