Cant install python jsonschema package using pip gettting backend BackendUnavailable

Viewed 2138

Im using python 2.7 and trying to install jsonschema package but its throwing me following error

I tried to upgrade the pip with command pip install --upgrade pip

Also tried with command pip install jsonschema --no-use-pep517. But still no luck.

 pip install jsonschema
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
Defaulting to user installation because normal site-packages is not writeable
Collecting jsonschema
  Using cached jsonschema-4.0.0.tar.gz (290 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
ERROR: Exception:
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/pip/_internal/cli/base_command.py", line 223, in _main
    status = self.run(options, args)
  File "/usr/local/lib/python2.7/site-packages/pip/_internal/cli/req_command.py", line 180, in wrapper
    return func(self, options, args)
  File "/usr/local/lib/python2.7/site-packages/pip/_internal/commands/install.py", line 321, in run
    reqs, check_supported_wheels=not options.target_dir
  File "/usr/local/lib/python2.7/site-packages/pip/_internal/resolution/legacy/resolver.py", line 180, in resolve
    discovered_reqs.extend(self._resolve_one(requirement_set, req))
  File "/usr/local/lib/python2.7/site-packages/pip/_internal/resolution/legacy/resolver.py", line 385, in _resolve_one
    dist = self._get_dist_for(req_to_install)
  File "/usr/local/lib/python2.7/site-packages/pip/_internal/resolution/legacy/resolver.py", line 337, in _get_dist_for
    dist = self.preparer.prepare_linked_requirement(req)
  File "/usr/local/lib/python2.7/site-packages/pip/_internal/operations/prepare.py", line 480, in prepare_linked_requirement
    return self._prepare_linked_requirement(req, parallel_builds)
  File "/usr/local/lib/python2.7/site-packages/pip/_internal/operations/prepare.py", line 524, in _prepare_linked_requirement
    req, self.req_tracker, self.finder, self.build_isolation,
  File "/usr/local/lib/python2.7/site-packages/pip/_internal/operations/prepare.py", line 88, in _get_prepared_distribution
    abstract_dist.prepare_distribution_metadata(finder, build_isolation)
  File "/usr/local/lib/python2.7/site-packages/pip/_internal/distributions/sdist.py", line 39, in prepare_distribution_metadata
    self._setup_isolation(finder)
  File "/usr/local/lib/python2.7/site-packages/pip/_internal/distributions/sdist.py", line 97, in _setup_isolation
    reqs = backend.get_requires_for_build_wheel()
  File "/usr/local/lib/python2.7/site-packages/pip/_vendor/pep517/wrappers.py", line 178, in get_requires_for_build_wheel
    'config_settings': config_settings
  File "/usr/local/lib/python2.7/site-packages/pip/_vendor/pep517/wrappers.py", line 284, in _call_hook
    raise BackendUnavailable(data.get('traceback', ''))
BackendUnavailable
2 Answers

jsonschema 3.2.0 and perhaps any version less than 4.0 support Python 2.7. Try

pip install "jsonschema<4.0"

Your Python package is 2.7 . Pip has stopped support this version. You need to upgrade your python version and then you should try this.

pip install jsonschema
Related