我不能让我的pip9.0.1正常工作

2024-10-06 07:46:48 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在使用Hostgator共享包来安装和运行我的Django项目, 我遵循了从这里开始的所有步骤http://support.hostgator.com/articles/django-with-fastcgi#shared-reseller(部分:使用Virtualenv设置Django)

我被困在第3步(安装Django):

  • ~/mydjango/bin/pip安装django

我得到这个输出:

Exception:
Traceback (most recent call last):
  File "/home2/belldentjc/mydjango/lib/python2.7/site-
packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/home2/belldentjc/mydjango/lib/python2.7/site-
packages/pip/commands/install.py", line 272, in run
    with self._build_session(options) as session:
  File "/home2/belldentjc/mydjango/lib/python2.7/site-
packages/pip/basecommand.py", line 72, in _build_session
    insecure_hosts=options.trusted_hosts,
  File "/home2/belldentjc/mydjango/lib/python2.7/site-
packages/pip/download.py", line 329, in __init__
    self.headers["User-Agent"] = user_agent()
  File "/home2/belldentjc/mydjango/lib/python2.7/site-
packages/pip/download.py", line 93, in user_agent
    from pip._vendor import distro
  File "/home2/belldentjc/mydjango/lib/python2.7/site-
packages/pip/_vendor/distro.py", line 1050, in <module>
    _distro = LinuxDistribution()
  File "/home2/belldentjc/mydjango/lib/python2.7/site-
packages/pip/_vendor/distro.py", line 594, in __init__
    if include_lsb else {}
  File "/home2/belldentjc/mydjango/lib/python2.7/site-
packages/pip/_vendor/distro.py", line 933, in _get_lsb_release_info
    raise subprocess.CalledProcessError(code, cmd, stdout)
CalledProcessError: Command 'lsb_release -a' returned non-zero exit status 3
Traceback (most recent call last):
  File "/home2/belldentjc/mydjango/bin/pip", line 11, in <module>
    sys.exit(main())
  File "/home2/belldentjc/mydjango/lib/python2.7/site-
packages/pip/__init__.py", line 233, in main
    return command.main(cmd_args)
  File "/home2/belldentjc/mydjango/lib/python2.7/site-
packages/pip/basecommand.py", line 251, in main
timeout=min(5, options.timeout)) as session:
  File "/home2/belldentjc/mydjango/lib/python2.7/site-
packages/pip/basecommand.py", line 72, in _build_session
    insecure_hosts=options.trusted_hosts,
  File "/home2/belldentjc/mydjango/lib/python2.7/site-
packages/pip/download.py", line 329, in __init__
    self.headers["User-Agent"] = user_agent()
  File "/home2/belldentjc/mydjango/lib/python2.7/site-
packages/pip/download.py", line 93, in user_agent
    from pip._vendor import distro
  File "/home2/belldentjc/mydjango/lib/python2.7/site-
packages/pip/_vendor/distro.py", line 1050, in <module>
    _distro = LinuxDistribution()
  File "/home2/belldentjc/mydjango/lib/python2.7/site-
packages/pip/_vendor/distro.py", line 594, in __init__
    if include_lsb else {}
  File "/home2/belldentjc/mydjango/lib/python2.7/site-
packages/pip/_vendor/distro.py", line 933, in _get_lsb_release_info
    raise subprocess.CalledProcessError(code, cmd, stdout)
subprocess.CalledProcessError: Command 'lsb_release -a' returned non-zero 
exit status 3

有人知道发生了什么吗?在


Tags: pipinpymainlibpackageslinesite