How to fix: ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied

Ebenezer
Sep 27, 2021

--

The issue:

ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: ‘/home/bencipherx/feedsomeone/venv/lib/python3.8/site-packages/decouple.py’
Consider using the ` — user` option or check the permissions.

Cause:

Installing the virtual environment as a root user.

Solution:

  1. chown -R user:group /path/to/anaconda/venv/env (fixed)
  2. Consider using the --user` option or check the permissions i.e. pip install [package_name]--user (not recommended because that will defeat the purpose of virtual environments which is to isolate project dependencies)

--

--

Ebenezer

I am a passionate Python Engineer and DevOps. Besides the technology, I also do charity work with my NGO at www.oluwafemiebenezer.foundation