alan-turing-institute / rds-course

Materials for Turing's Research Data Science course
https://alan-turing-institute.github.io/rds-course/
31 stars 13 forks source link

Book build action failing: `pip` issue with `jsonschema` #152

Closed jack89roberts closed 1 year ago

jack89roberts commented 1 year ago
INFO: pip is looking at multiple versions of jsonschema to determine which version is compatible with other requirements. This could take a while.
Collecting jsonschema<4
  Downloading jsonschema-3.1.1-py2.py3-none-any.whl (56 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 56.1/56.1 kB 18.9 MB/s eta 0:00:00
  Downloading jsonschema-3.1.0-py2.py3-none-any.whl (56 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 56.1/56.1 kB 21.2 MB/s eta 0:00:00
Collecting js-regex>=1.0.0
  Downloading js_regex-1.0.1-py3-none-any.whl (12 kB)
Collecting jsonschema<4
  Downloading jsonschema-3.0.2-py2.py3-none-any.whl (54 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 54.7/54.7 kB 21.0 MB/s eta 0:00:00
  Downloading jsonschema-3.0.1-py2.py3-none-any.whl (54 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 54.4/54.4 kB 18.0 MB/s eta 0:00:00
  Downloading jsonschema-3.0.0-py2.py3-none-any.whl (54 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 54.0/54.0 kB 19.0 MB/s eta 0:00:00
  Downloading jsonschema-2.6.0-py2.py3-none-any.whl (39 kB)
  Downloading jsonschema-2.5.1-py2.py3-none-any.whl (38 kB)
INFO: pip is looking at multiple versions of jsonschema to determine which version is compatible with other requirements. This could take a while.
Downloading jsonschema-2.5.0.zip (81 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 81.1/81.1 kB 31.2 MB/s eta 0:00:00
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'error'
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [48 lines of output]
      WARNING: The wheel package is not available.
        error: subprocess-exited-with-error

        × python setup.py bdist_wheel did not run successfully.
        │ exit code: 1
        ╰─> [6 lines of output]
            usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
               or: setup.py --help [cmd1 cmd2 ...]
               or: setup.py --help-commands
               or: setup.py cmd --help

            error: invalid command 'bdist_wheel'
            [end of output]

        note: This error originates from a subprocess, and is likely not a problem with pip.
        ERROR: Failed building wheel for vcversioner
      ERROR: Failed to build one or more wheels
      Traceback (most recent call last):
        File "/opt/hostedtoolcache/Python/3.9.16/x64/lib/python3.9/site-packages/setuptools/installer.py", line 75, in fetch_build_egg
          subprocess.check_call(cmd)
        File "/opt/hostedtoolcache/Python/3.9.16/x64/lib/python3.9/subprocess.py", line [373](https://github.com/alan-turing-institute/rds-course/actions/runs/4152080442/jobs/7182788254#step:4:374), in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '['/opt/hostedtoolcache/Python/3.9.16/x64/bin/python', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmpsz1r_mpy', '--quiet', 'vcversioner']' returned non-zero exit status 1.

      The above exception was the direct cause of the following exception:

      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-997h9kjp/jsonschema_5bb4759760c3485d9ef74ef45d4757ee/setup.py", line 34, in <module>
          setup(
        File "/opt/hostedtoolcache/Python/3.9.16/x64/lib/python3.9/site-packages/setuptools/__init__.py", line 152, in setup
          _install_setup_requires(attrs)
        File "/opt/hostedtoolcache/Python/3.9.16/x64/lib/python3.9/site-packages/setuptools/__init__.py", line 147, in _install_setup_requires
          dist.fetch_build_eggs(dist.setup_requires)
        File "/opt/hostedtoolcache/Python/3.9.16/x64/lib/python3.9/site-packages/setuptools/dist.py", line 806, in fetch_build_eggs
          resolved_dists = pkg_resources.working_set.resolve(
        File "/opt/hostedtoolcache/Python/3.9.16/x64/lib/python3.9/site-packages/pkg_resources/__init__.py", line 766, in resolve
          dist = best[req.key] = env.best_match(
        File "/opt/hostedtoolcache/Python/3.9.16/x64/lib/python3.9/site-packages/pkg_resources/__init__.py", line 1051, in best_match
          return self.obtain(req, installer)
        File "/opt/hostedtoolcache/Python/3.9.16/x64/lib/python3.9/site-packages/pkg_resources/__init__.py", line 1063, in obtain
          return installer(requirement)
        File "/opt/hostedtoolcache/Python/3.9.16/x64/lib/python3.9/site-packages/setuptools/dist.py", line 877, in fetch_build_egg
          return fetch_build_egg(self, req)
        File "/opt/hostedtoolcache/Python/3.9.16/x64/lib/python3.9/site-packages/setuptools/installer.py", line 77, in fetch_build_egg
          raise DistutilsError(str(e)) from e
      distutils.errors.DistutilsError: Command '['/opt/hostedtoolcache/Python/3.9.16/x64/bin/python', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmpsz1r_mpy', '--quiet', 'vcversioner']' 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: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
Error: Process completed with exit code 1.
jack89roberts commented 1 year ago

Can workaround by: