Reputation:
How do I install the REST framework in django?
The following command throws an error on Mac OS X:
pip install djangorestframework-jsonapi
Error:
Could not find a version that satisfies the requirement djangorestframework-jsonapi (from versions) No matching distribution found for djangorestframework-jsonapi
Upvotes: 1
Views: 16574
Reputation: 61
Its simple if you want to install Django rest framework on your machine make sure your pip version is up to date.
use this command:
pip install djangorestframework
If this command is not working use this one:
pip3 install djangorestframework
Hope this will be helpful for you.
Upvotes: 0
Reputation: 832
It's not best practice to sudo install like Yogesh suggested. This is because: 1. Isolation is important and 2. It's always good to know exactly what your dependencies are for your application.
With that being said, it's best to install your package in either a virtualenv or docker environment.
virtualenv env
source env/bin/activate
pip install djangorestframework-jsonapi
Upvotes: 0
Reputation: 5137
Are you installing Django Rest Framework or are you installing the JSON API? If it is just DRF, check the installation docs: http://www.django-rest-framework.org/#installation
Otherwise, please provide more info like what version of Python and your OS as well as what version of the library you are installing.
Upvotes: 0