0

I'm working with a Hostgator Shared package to install and run my Django projects, I followed all the steps from here http://support.hostgator.com/articles/django-with-fastcgi#shared-reseller (section: Setup Django Using Virtualenv)

I get stuck in step 3 (Install Django):

  • ~/mydjango/bin/pip install django

I get this output:

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

Does someone have an idea of what is happening?

BrianCas
  • 749
  • 3
  • 12
  • 22
  • which linux distro are you using? the error is `'lsb_release -a' returned non-zero exit status 3`, you can try this command `lsb_release -a` on you command line and see what happens. – CSJ Jan 23 '18 at 05:15
  • @CSJ LSB Version: Distributor ID: n/a Description: (none) Release: n/a Codename: n/a – BrianCas Jan 23 '18 at 05:17
  • 1
    maybe can try: https://github.com/pypa/pip/issues/4924 or https://stackoverflow.com/questions/44967202/pip-is-showing-error-lsb-release-a-returned-non-zero-exit-status-1 – CSJ Jan 23 '18 at 05:21
  • dude..setting up django on hostgator is headache.. i struggled a lot doing that. – Sumeet Kumar Jan 23 '18 at 08:37
  • @SumeetKumar I once installed my django and virtualenv without problems (with hostgator), like two years ago. I dont know if they updated the OS or what, but it seems like the only solution right now is to change my hosting provider, luckly I can get my refund back. – BrianCas Jan 23 '18 at 21:24
  • @CSJ yes, I came across with that page as well, but I dont have permission to write the lsb_release doc, I even ask the Tech support to help me out but they couldn't (Not authorized). so I'll change my hosting provider, Thanks for the help anyway – BrianCas Jan 23 '18 at 21:29
  • they haven't updated anything though.. i have my website hosted with them. – Sumeet Kumar Jan 24 '18 at 14:25

0 Answers0