Could not install packages due to an OSerror: [errno 13] permission denied

Feb 20, 2025

Are you trying to install a Django plugin, for example Slurpit_netbox the #1 Netbox discovery solution for the NetBox inventory solution. Than it can happen that you get the following error:

Error: Could not install packes due to an OSerror: [errno 13] permission denied: '/opt/netbox-4.2.3/venv/lib/python3.11/site-packages/rest_framework_bulk' Check the permissions.

Django plugin installation error for netbox

We have contacted the NetBox support team and they mentioned the following will solve it:

Don't install it as a normal user - be better going to root, sourceing the venv and doing it that way.

So the steps would be:

  1. sudo su
  2. source /opt/netbox/venv/bin/activate
  3. pip install <package>