pip wont update or install modules correctly

0

I've tried several times with several different packages and I've tried upgrading pip. I do

C:\Users\Michael>pip install pillow
Collecting pillow
  Downloading https://files.pythonhosted.org/packages/40/f2/a424d4d5dd6aa8c26636969decbb3da1c01286d344e71429b1d648bccb64/Pillow-6.0.0-cp37-cp37m-win_amd64.whl (2.0MB)
    100% |████████████████████████████████| 2.0MB 1.8MB/s
Installing collected packages: pillow
Could not install packages due to an EnvironmentError: [WinError 5] Access is denied: 'c:\\program files\\python37\\Lib\\site-packages\\PIL'
Consider using the `--user` option or check the permissions.

You are using pip version 10.0.1, however version 19.0.3 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

piCounter

Posted 2019-04-03T01:00:20.930

Reputation: 3

Answers

0

Picking the message apart:

Could not install packages due to an EnvironmentError: [WinError 5] Access is denied: 'c:\\program files\\python37\\Lib\\site-packages\\PIL'
Consider using the `--user` option or check the permissions.

This means your user is not allowed to create files in the directory above. You'll need to run the terminal or just the command as an administrative user. Alternatively, you can add the --user flag to the command (as in, pip install --user pillow) to install the program in a directory owned by your user. This will make the program only available to that user.

You are using pip version 10.0.1, however version 19.0.3 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

This is just a generic message hinting that there is a much newer version of Pip available, and urging you to upgrade. The same permission issue will apply to the command it suggests to run.

l0b0

Posted 2019-04-03T01:00:20.930

Reputation: 6 306