[Answered ]-ERROR: Could not find a version that satisfies the requirement rest-framework (unavailable) (from versions: none)

1👍

Your error messages says

ERROR: Could not find a version that satisfies the requirement rest-framework (unavailable) (from versions: none)

which means that your requirements.txt file is listing rest-framework as a requirement. However, there is no such module listed on PyPI. Did you mean to use python-rest-framework instead, or some other django-specific package?

Fix your requirements.txt file to make sure it correctly lists your dependencies, and things should work. To make sure you have the correct package name, it should exist on https://pypi.org. https://pypi.org/search/?q=rest-framework lists a number of possibilities you might have meant to use.

PS: pip install djangorestframework-jsonapi already installed module rest_framework for me, so maybe the correct replacement for rest-framework in your requirements.txt is simply pip install djangorestframework-jsonapi.

See also: https://django-rest-framework-json-api.readthedocs.io/en/stable/getting-started.html#installation

👤joanis

Leave a comment