0

I am on a windows 10 system, and I recently installed the latest version of python python 3.7.0. I enable the PATH and tried to install pygame through CMD.

I first type in pip, that works as normal.

I then try pip install pygame

Now, this is where the problem arises.

CMD comes up with this:

Collecting pygame
  Using cached https://files.pythonhosted.org/packages/b0/30/4df62b0eb0f09a8ad1c329ff5479b3b115e8dce25475fd0c2f73cb790aa4/pygame-1.9.4-cp37-cp37m-win32.whl
Installing collected packages: pygame
Could not install packages due to an EnvironmentError: [WinError 5] Access is denied: 'c:\\program files (x86)\\python37-32\\Lib\\site-packages\\pygame'
Consider using the `--user` option or check the permissions.

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

So I type in python -m pip install --upgrade and then this happens:

Collecting pip
  Using cached https://files.pythonhosted.org/packages/5f/25/e52d3f31441505a5f3af41213346e5b6c221c9e086a166f3703d2ddaf940/pip-18.0-py2.py3-none-any.whl
Installing collected packages: pip
  Found existing installation: pip 10.0.1
    Uninstalling pip-10.0.1:
Could not install packages due to an EnvironmentError: [WinError 5] Access is denied: 'c:\\program files (x86)\\python37-32\\lib\\site-packages\\pip-10.0.1.dist-info\\entry_points.txt'
Consider using the `--user` option or check the permissions.

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

Why is it doing this? Somebody please help me and thank you in advance.

R.M.R
  • 193
  • 1
  • 2
  • 9
  • Are you using `local`,`child` or `admin` account? – Nouman Sep 02 '18 at 14:46
  • Do you mean on my windows system? – R.M.R Sep 02 '18 at 14:47
  • 1
    "Access dienied" means that you don't have enough permissions to change the global setup of your Python installation. Either open a cmd line with Adminstrator permissions, or better: learn how to use Python virtual environments. – rocksportrocker Sep 02 '18 at 14:47
  • @rocksportrocker Thanks for your help, I cannot believe I didn't think to run in admin mode how stupid of me. – R.M.R Sep 02 '18 at 14:56
  • Possible duplicate of [Python virtual environment package install issue](https://stackoverflow.com/questions/51833041/python-virtual-environment-package-install-issue) – phd Sep 02 '18 at 15:02
  • https://stackoverflow.com/search?q=%5Bpip%5D+Could+not+install+packages+due+to+an+EnvironmentError%3A+WinError+5+Access+is+denied – phd Sep 02 '18 at 15:02
  • https://stackoverflow.com/questions/31512422/pip-install-r-oserror-errno-13-permission-denied – phd Sep 02 '18 at 15:03

1 Answers1

3

"Access dienied" means that you don't have enough permissions to change the global setup of your Python installation.

Either open a cmd line with Adminstrator permissions, or better: learn how to use Python virtual environments: https://docs.python-guide.org/dev/virtualenvs/

rocksportrocker
  • 7,251
  • 2
  • 31
  • 48