[Django]-OSError: [Errno 13] Permission denied when installing django

7👍

✅

You need to activate your virtual environment first.

$ source PATH_TO_ENV/bin/env
$ pip install django

In a newly created virtualenv there will also be a activate shell script. For Windows systems, activation scripts are provided for the Command Prompt and Powershell.

On Posix systems, this resides in /ENV/bin/

Unless you do this you are using system python and system libs. That’s why you see the error.

If you need to install a lib into the system scope you need root access:

$ sudo pip install django

Leave a comment