ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: How I solve it?

Viewed 14623

When I run:

pip install djangorestframework

I got this error message:

ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/usr/local/lib/python3.6/dist-packages/asgiref' Consider using the --user option or check the permissions.

3 Answers

You simply have not enought permissions to install library to user dir. Consider using virtual environment instead of installing all modules in your local Python repository.

Use sudo pip install djangorestframework . sudo basically makes you a superuser with privileges to install new packages, you can read about it here in detail

Just add 'sudo' and it should work: sudo pip install djangorestframework

It missing permission to open the asgiref file. Prob a solution here

Related