jupyterhub / binderhub

Run your code in the cloud, with technology so advanced, it feels like magic!
https://binderhub.readthedocs.io
BSD 3-Clause "New" or "Revised" License
2.54k stars 388 forks source link

Cannot build wheel for binderhub #1508

Closed kmpaul closed 2 years ago

kmpaul commented 2 years ago

Bug description

When attempting to install BinderHub with pip, it fails. Not sure if this is because of a dependency shift, but it was installing as of last week.

Expected behaviour

Following the documentation on the BinderHub repository README, I would expect that the pip install approach here:

pip install git+https://github.com/jupyterhub/binderhub

should install BinderHub without error.

Actual behaviour

When you try to install BinderHub with the previous command, it fails with the error:

Building wheels for collected packages: binderhub
  Building wheel for binderhub (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for binderhub (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [58 lines of output]
      running bdist_wheel
      running pre_dist
      Installing build dependencies with npm.  This may take a while...
      > npm install
      npm ERR! code E404
      npm ERR! 404 Not Found - GET https://registry.npmjs.org/@types/eslint/-/eslint-8.4.4.tgz - Not found
      npm ERR! 404
      npm ERR! 404  '@types/eslint@https://registry.npmjs.org/@types/eslint/-/eslint-8.4.4.tgz' is not in this registry.
      npm ERR! 404
      npm ERR! 404 Note that you can also install from a
      npm ERR! 404 tarball, folder, http url, or git url.

      npm ERR! A complete log of this run can be found in:
      npm ERR!     /root/.npm/_logs/2022-06-30T20_29_59_206Z-debug-0.log
      Traceback (most recent call last):
        File "/opt/binder/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
          main()
        File "/opt/binder/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/opt/binder/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 261, in build_wheel
          return _build_backend().build_wheel(wheel_directory, config_settings,
        File "/tmp/pip-build-env-jkqo2777/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 244, in build_wheel
          return self._build_with_temp_dir(['bdist_wheel'], '.whl',
        File "/tmp/pip-build-env-jkqo2777/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 229, in _build_with_temp_dir
          self.run_setup()
        File "/tmp/pip-build-env-jkqo2777/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 174, in run_setup
          exec(compile(code, __file__, 'exec'), locals())
        File "setup.py", line 41, in <module>
          setup(
        File "/tmp/pip-build-env-jkqo2777/overlay/lib/python3.9/site-packages/setuptools/__init__.py", line 87, in setup
          return distutils.core.setup(**attrs)
        File "/tmp/pip-build-env-jkqo2777/overlay/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 177, in setup
          return run_commands(dist)
        File "/tmp/pip-build-env-jkqo2777/overlay/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 193, in run_commands
          dist.run_commands()
        File "/tmp/pip-build-env-jkqo2777/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 968, in run_commands
          self.run_command(cmd)
        File "/tmp/pip-build-env-jkqo2777/overlay/lib/python3.9/site-packages/setuptools/dist.py", line 1229, in run_command
          super().run_command(command)
        File "/tmp/pip-build-env-jkqo2777/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
          cmd_obj.run()
        File "/tmp/pip-build-env-jkqo2777/overlay/lib/python3.9/site-packages/jupyter_packaging/setupbase.py", line 145, in run
          self.run_command(pre_build.__name__)
        File "/tmp/pip-build-env-jkqo2777/overlay/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 317, in run_command
          self.distribution.run_command(command)
        File "/tmp/pip-build-env-jkqo2777/overlay/lib/python3.9/site-packages/setuptools/dist.py", line 1229, in run_command
          super().run_command(command)
        File "/tmp/pip-build-env-jkqo2777/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
          cmd_obj.run()
        File "/tmp/pip-build-env-jkqo2777/overlay/lib/python3.9/site-packages/jupyter_packaging/setupbase.py", line 126, in run
          func()
        File "/tmp/pip-build-env-jkqo2777/overlay/lib/python3.9/site-packages/jupyter_packaging/setupbase.py", line 230, in builder
          run(npm_cmd + ["install"], cwd=node_package)
        File "/tmp/pip-build-env-jkqo2777/overlay/lib/python3.9/site-packages/jupyter_packaging/setupbase.py", line 296, in run
          return subprocess.check_call(cmd, **kwargs)
        File "/opt/binder/lib/python3.9/subprocess.py", line 373, in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '['/opt/binder/bin/npm', 'install']' returned non-zero exit status 1.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for binderhub
Failed to build binderhub
ERROR: Could not build wheels for binderhub, which is required to install pyproject.toml-based projects
Full output is here: ```console # pip install git+https://github.com/jupyterhub/binderhub Collecting git+https://github.com/jupyterhub/binderhub Cloning https://github.com/jupyterhub/binderhub to /tmp/pip-req-build-mjlxr276 Running command git clone --filter=blob:none --quiet https://github.com/jupyterhub/binderhub /tmp/pip-req-build-mjlxr276 Resolved https://github.com/jupyterhub/binderhub to commit 2d15492f627962d1c69fb6732f7f87787c9500d7 Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done Collecting tornado>=5.1 Using cached tornado-6.1-cp39-cp39-manylinux2010_x86_64.whl (427 kB) Collecting docker Using cached docker-5.0.3-py2.py3-none-any.whl (146 kB) Collecting prometheus-client Using cached prometheus_client-0.14.1-py3-none-any.whl (59 kB) Collecting pyjwt>=2 Using cached PyJWT-2.4.0-py3-none-any.whl (18 kB) Collecting escapism Using cached escapism-1.0.1-py2.py3-none-any.whl (3.4 kB) Collecting jinja2 Using cached Jinja2-3.1.2-py3-none-any.whl (133 kB) Collecting kubernetes Using cached kubernetes-24.2.0-py2.py3-none-any.whl (1.5 MB) Collecting jupyterhub Using cached jupyterhub-2.3.1-py3-none-any.whl (3.7 MB) Collecting jsonschema Using cached jsonschema-4.6.1-py3-none-any.whl (80 kB) Collecting python-json-logger Using cached python_json_logger-2.0.2-py3-none-any.whl (7.4 kB) Collecting traitlets Using cached traitlets-5.3.0-py3-none-any.whl (106 kB) Collecting websocket-client>=0.32.0 Using cached websocket_client-1.3.3-py3-none-any.whl (54 kB) Requirement already satisfied: requests!=2.18.0,>=2.14.2 in /opt/binder/lib/python3.9/site-packages (from docker->binderhub==0.2.0+979.g2d15492) (2.27.1) Collecting MarkupSafe>=2.0 Using cached MarkupSafe-2.1.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (25 kB) Collecting pyrsistent!=0.17.0,!=0.17.1,!=0.17.2,>=0.14.0 Using cached pyrsistent-0.18.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (115 kB) Collecting attrs>=17.4.0 Using cached attrs-21.4.0-py2.py3-none-any.whl (60 kB) Collecting async-generator>=1.9 Using cached async_generator-1.10-py3-none-any.whl (18 kB) Collecting packaging Using cached packaging-21.3-py3-none-any.whl (40 kB) Collecting entrypoints Using cached entrypoints-0.4-py3-none-any.whl (5.3 kB) Collecting pamela Using cached pamela-1.0.0-py2.py3-none-any.whl (5.8 kB) Collecting python-dateutil Using cached python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB) Collecting oauthlib>=3.0 Using cached oauthlib-3.2.0-py3-none-any.whl (151 kB) Collecting SQLAlchemy>=1.1 Using cached SQLAlchemy-1.4.39-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.6 MB) Collecting certipy>=0.1.2 Using cached certipy-0.1.3-py3-none-any.whl (22 kB) Collecting alembic>=1.4 Using cached alembic-1.8.0-py3-none-any.whl (209 kB) Collecting jupyter-telemetry>=0.1.0 Using cached jupyter_telemetry-0.1.0-py3-none-any.whl (7.1 kB) Collecting requests-oauthlib Using cached requests_oauthlib-1.3.1-py2.py3-none-any.whl (23 kB) Requirement already satisfied: certifi>=14.05.14 in /opt/binder/lib/python3.9/site-packages (from kubernetes->binderhub==0.2.0+979.g2d15492) (2022.6.15) Requirement already satisfied: six>=1.9.0 in /opt/binder/lib/python3.9/site-packages (from kubernetes->binderhub==0.2.0+979.g2d15492) (1.16.0) Requirement already satisfied: setuptools>=21.0.0 in /opt/binder/lib/python3.9/site-packages (from kubernetes->binderhub==0.2.0+979.g2d15492) (61.2.0) Requirement already satisfied: urllib3>=1.24.2 in /opt/binder/lib/python3.9/site-packages (from kubernetes->binderhub==0.2.0+979.g2d15492) (1.26.8) Collecting google-auth>=1.0.1 Using cached google_auth-2.9.0-py2.py3-none-any.whl (167 kB) Collecting pyyaml>=5.4.1 Using cached PyYAML-6.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (661 kB) Collecting Mako Using cached Mako-1.2.1-py3-none-any.whl (78 kB) Requirement already satisfied: pyopenssl in /opt/binder/lib/python3.9/site-packages (from certipy>=0.1.2->jupyterhub->binderhub==0.2.0+979.g2d15492) (22.0.0) Collecting rsa<5,>=3.1.4 Using cached rsa-4.8-py3-none-any.whl (39 kB) Collecting pyasn1-modules>=0.2.1 Using cached pyasn1_modules-0.2.8-py2.py3-none-any.whl (155 kB) Collecting cachetools<6.0,>=2.0.0 Using cached cachetools-5.2.0-py3-none-any.whl (9.3 kB) Collecting ruamel.yaml Using cached ruamel.yaml-0.17.21-py3-none-any.whl (109 kB) Requirement already satisfied: charset-normalizer~=2.0.0 in /opt/binder/lib/python3.9/site-packages (from requests!=2.18.0,>=2.14.2->docker->binderhub==0.2.0+979.g2d15492) (2.0.4) Requirement already satisfied: idna<4,>=2.5 in /opt/binder/lib/python3.9/site-packages (from requests!=2.18.0,>=2.14.2->docker->binderhub==0.2.0+979.g2d15492) (3.3) Collecting greenlet!=0.4.17 Using cached greenlet-1.1.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (153 kB) Collecting pyparsing!=3.0.5,>=2.0.2 Using cached pyparsing-3.0.9-py3-none-any.whl (98 kB) Collecting pyasn1<0.5.0,>=0.4.6 Using cached pyasn1-0.4.8-py2.py3-none-any.whl (77 kB) Requirement already satisfied: cryptography>=35.0 in /opt/binder/lib/python3.9/site-packages (from pyopenssl->certipy>=0.1.2->jupyterhub->binderhub==0.2.0+979.g2d15492) (36.0.0) Collecting ruamel.yaml.clib>=0.2.6 Using cached ruamel.yaml.clib-0.2.6-cp39-cp39-manylinux1_x86_64.whl (539 kB) Requirement already satisfied: cffi>=1.12 in /opt/binder/lib/python3.9/site-packages (from cryptography>=35.0->pyopenssl->certipy>=0.1.2->jupyterhub->binderhub==0.2.0+979.g2d15492) (1.15.0) Requirement already satisfied: pycparser in /opt/binder/lib/python3.9/site-packages (from cffi>=1.12->cryptography>=35.0->pyopenssl->certipy>=0.1.2->jupyterhub->binderhub==0.2.0+979.g2d15492) (2.21) Building wheels for collected packages: binderhub Building wheel for binderhub (pyproject.toml) ... error error: subprocess-exited-with-error × Building wheel for binderhub (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [58 lines of output] running bdist_wheel running pre_dist Installing build dependencies with npm. This may take a while... > npm install npm ERR! code E404 npm ERR! 404 Not Found - GET https://registry.npmjs.org/@types/eslint/-/eslint-8.4.4.tgz - Not found npm ERR! 404 npm ERR! 404 '@types/eslint@https://registry.npmjs.org/@types/eslint/-/eslint-8.4.4.tgz' is not in this registry. npm ERR! 404 npm ERR! 404 Note that you can also install from a npm ERR! 404 tarball, folder, http url, or git url. npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2022-06-30T20_29_59_206Z-debug-0.log Traceback (most recent call last): File "/opt/binder/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in main() File "/opt/binder/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main json_out['return_val'] = hook(**hook_input['kwargs']) File "/opt/binder/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 261, in build_wheel return _build_backend().build_wheel(wheel_directory, config_settings, File "/tmp/pip-build-env-jkqo2777/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 244, in build_wheel return self._build_with_temp_dir(['bdist_wheel'], '.whl', File "/tmp/pip-build-env-jkqo2777/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 229, in _build_with_temp_dir self.run_setup() File "/tmp/pip-build-env-jkqo2777/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 174, in run_setup exec(compile(code, __file__, 'exec'), locals()) File "setup.py", line 41, in setup( File "/tmp/pip-build-env-jkqo2777/overlay/lib/python3.9/site-packages/setuptools/__init__.py", line 87, in setup return distutils.core.setup(**attrs) File "/tmp/pip-build-env-jkqo2777/overlay/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 177, in setup return run_commands(dist) File "/tmp/pip-build-env-jkqo2777/overlay/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 193, in run_commands dist.run_commands() File "/tmp/pip-build-env-jkqo2777/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 968, in run_commands self.run_command(cmd) File "/tmp/pip-build-env-jkqo2777/overlay/lib/python3.9/site-packages/setuptools/dist.py", line 1229, in run_command super().run_command(command) File "/tmp/pip-build-env-jkqo2777/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 987, in run_command cmd_obj.run() File "/tmp/pip-build-env-jkqo2777/overlay/lib/python3.9/site-packages/jupyter_packaging/setupbase.py", line 145, in run self.run_command(pre_build.__name__) File "/tmp/pip-build-env-jkqo2777/overlay/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 317, in run_command self.distribution.run_command(command) File "/tmp/pip-build-env-jkqo2777/overlay/lib/python3.9/site-packages/setuptools/dist.py", line 1229, in run_command super().run_command(command) File "/tmp/pip-build-env-jkqo2777/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 987, in run_command cmd_obj.run() File "/tmp/pip-build-env-jkqo2777/overlay/lib/python3.9/site-packages/jupyter_packaging/setupbase.py", line 126, in run func() File "/tmp/pip-build-env-jkqo2777/overlay/lib/python3.9/site-packages/jupyter_packaging/setupbase.py", line 230, in builder run(npm_cmd + ["install"], cwd=node_package) File "/tmp/pip-build-env-jkqo2777/overlay/lib/python3.9/site-packages/jupyter_packaging/setupbase.py", line 296, in run return subprocess.check_call(cmd, **kwargs) File "/opt/binder/lib/python3.9/subprocess.py", line 373, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['/opt/binder/bin/npm', 'install']' returned non-zero exit status 1. [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for binderhub Failed to build binderhub ERROR: Could not build wheels for binderhub, which is required to install pyproject.toml-based projects ```

How to reproduce

  1. Create a "blank" Conda environment: conda create --name binderhub python
  2. Activate the environment: conda activate binderhub
  3. Try to install binderhub: pip install git+https://github.com/jupyterhub/binderhub
  4. See error

Your personal set up

OS: CentOS 8.4.2105

Conda Environment:

welcome[bot] commented 2 years ago

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively. welcome You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! :wave:
Welcome to the Jupyter community! :tada:

kmpaul commented 2 years ago

This also fails on my Mac with the same error messages. And this is the full npm log:

2022-06-30T20_02_55_737Z-debug-0.log

MridulS commented 2 years ago

npm is down right now https://status.npmjs.org/ and eslint v8.4.4 is one of the missing tarballs https://github.com/DefinitelyTyped/DefinitelyTyped/issues/61032

kmpaul commented 2 years ago

Thanks, @MridulS! I didn't even bother to check that. I appreciate the update. Closing. (And sorry for the noise!)