0

I'm working with a MaxOS High Sierra and have python 3.7 I'm running it on my console but it bounces back with an error message reading

ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/idna' Consider using the --user option or check the permissions.

I do not know what it means by this and gave permissions to that folder and made it available to everyone.

  • You need to create a virtual environment. Once you've done this, you need to call the pip command **within** said environment. One way to assure this is to call it as `alex_mirets/newly/created/venv/bin/pip install gspread`. – hd1 Nov 25 '20 at 04:34
  • https://stackoverflow.com/search?q=%5Bpip%5D+Could+not+install+packages+due+to+an+EnvironmentError+Errno+13+Permission+denied – phd Nov 25 '20 at 05:17

1 Answers1

0

Based on the command output, I would try running pip3 instead of pip since it appears there are multiple versions of pip/python installed in the environment. This would theoretically cause pip to reference python 3.7 for the installation instead of python 2.7 which is indicated by the output of the error message.

  • I'm using > pip install gspread and its bouncing back with an error for a folder in my library. See edited post for details. – alex miret Nov 25 '20 at 04:30
  • Try pip3 install gspread since the error indicates the pip installation being referenced is for python 2.7 and the version you are attempting to use is 3.7. Not sure if this will fix it but worth a try. – Quentin567 Nov 25 '20 at 04:32
  • this helped a lot! I didn't realize I had python 2.7 and 3.7 – alex miret Nov 25 '20 at 04:59