Jupyterhub spawn fails - tornado.web.HTTPError: HTTP 500: Internal Server Error

Bug description

I have installed jupyter hub development install using the following documentation:

The python3 installed is a python alt install and not a virtual env via conda. When I start the hub in a conda environment, i am able to login, do a notebook server spawn and perform python operations.
In the python3 alt install env, when i start the hub, the spawn fails with the following error:

ERROR:asyncio:Task exception was never retrieved
future: <Task finished coro=<BaseHandler.spawn_single_user() done, defined at /data/jhub/jupyterhub/jupyterhub/handlers/base.py:741> exception=HTTPError()>
Traceback (most recent call last):
  File "/data/jhub/jupyterhub/jupyterhub/handlers/base.py", line 939, in spawn_single_user
    timedelta(seconds=self.slow_spawn_timeout), finish_spawn_future
tornado.util.TimeoutError: Timeout

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/data/jhub/jupyterhub/jupyterhub/handlers/base.py", line 972, in spawn_single_user
    % (status, spawner._log_name),
tornado.web.HTTPError: HTTP 500: Internal Server Error (Spawner failed to start [status=1]. The logs for admin may contain details.)
[W 2020-08-20 13:06:37.464 JupyterHub user:697] admin's server never showed up at http:// after 30 seconds. Giving up
[E 2020-08-20 13:06:37.530 JupyterHub gen:599] Exception in Future <Task finished coro=<BaseHandler.spawn_single_user.<locals>.finish_user_spawn() done, defined at /data/jhub/jupyterhub/jupyterhub/handlers/base.py:845> exception=TimeoutError("Server at http:// didn't respond in 30 seconds",)> after timeout
    Traceback (most recent call last):
      File "/usr/local/lib64/python3.6/site-packages/tornado/gen.py", line 593, in error_callback
      File "/data/jhub/jupyterhub/jupyterhub/handlers/base.py", line 852, in finish_user_spawn
        await spawn_future
      File "/data/jhub/jupyterhub/jupyterhub/user.py", line 673, in spawn
        await self._wait_up(spawner)
      File "/data/jhub/jupyterhub/jupyterhub/user.py", line 720, in _wait_up
        raise e
      File "/data/jhub/jupyterhub/jupyterhub/user.py", line 688, in _wait_up
        http=True, timeout=spawner.http_timeout, ssl_context=ssl_context
      File "/data/jhub/jupyterhub/jupyterhub/utils.py", line 234, in wait_for_http_server
      File "/data/jhub/jupyterhub/jupyterhub/utils.py", line 177, in exponential_backoff
        raise TimeoutError(fail_message)
    TimeoutError: Server at http:// didn't respond in 30 seconds

[I 2020-08-20 13:06:37.539 JupyterHub log:181] 200 GET /hub/api/users/admin/server/progress (admin@::ffff: 31249.70ms

But if i spawn a anaconda virtualenv, it works properly there.

Hi! Welcome to the forum. Please could you explain what you mean by


The system has a default python 2.7 on top of which python 3 was installed. Using the make && make altinstall command.