错误:无法找到适合 Requirement.parse('six>=1.9') 的分布

错误:无法找到适合 Requirement.parse('six>=1.9') 的分布

我正在使用编译 yocto 构建bitbake,在执行此操作时,我在日志文件中看到以下错误

Searching for six>=1.9
Reading https://pypi.python.org/simple/six/

Download error on https://pypi.python.org/simple/six/: [Errno -3] Temporary failure in name 
resolution -- Some packages may not be found!

Couldn't find index page for 'six' (maybe misspelled?)

Scanning index of all packages (this may take a while)

Reading https://pypi.python.org/simple/

Download error on https://pypi.python.org/simple/: [Errno -3] Temporary failure in name resolution -- Some packages may not be found!

No local packages or working download links found for six>=1.9
error: Could not find suitable distribution for Requirement.parse('six>=1.9')

ERROR: python setup.py install execution failed.

当我尝试安装时six,我发现以下问题

$pip install six
Traceback (most recent call last):
  File "/usr/local/bin/pip", line 7, in <module>
    from pip._internal.cli.main import main
  File "/usr/local/lib/python2.7/dist-packages/pip/_internal/cli/main.py", line 60
    sys.stderr.write(f"ERROR: {exc}")
                                   ^
SyntaxError: invalid syntax

pip3

$pip3 install six
Collecting six

Exception:
Traceback (most recent call last):
  File "/usr/share/python-wheels/urllib3-1.13.1-py2.py3-none-any.whl/urllib3/connection.py", line 140, in _new_conn
    (self.host, self.port), self.timeout, **extra_kw)
  File "/usr/share/python-wheels/urllib3-1.13.1-py2.py3-none-any.whl/urllib3/util/connection.py", line 67, in create_connection
    for res in socket.getaddrinfo(host, port, 0, socket.SOCK_STREAM):
  File "/usr/lib/python3.5/socket.py", line 732, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Temporary failure in name resolution

Linux 版本:x86 4.15.0-139-generic #143~16.04.1-Ubuntu

相关内容