1

After I entered the command: pip install pandas on the pycharm terminal, I got the following error:

-------------------------------------------------------------------------------------------------
ERROR: Could not install packages due to an OSError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\User\\A
ppData\\Local\\Temp\\pip-req-tracker-7q66q0yu\\6db4818fba87cd56fb7ea2ff3e7b500fdbaefe4fef5779e374622b60'
Consider using the `--user` option or check the permissions.
-------------------------------------------------------------------------------------------------

I would be grateful if I could get help in fixing this error.

quamrana
  • 37,849
  • 12
  • 53
  • 71
Ayushman
  • 21
  • 2

1 Answers1

1

You need to run the command prompt or terminal as an administrator. This will give you permission to install packages. And also you need to upgrade pip to the latest version - python -m pip install –upgrade pip in cmd or terminal.

And If this does not work for you then, you can try pip install --user pygame.

I got this from this post

codester_09
  • 5,622
  • 2
  • 5
  • 27
  • 1
    The second suggestion worked for me!!! Thanks a lot for the help. – Ayushman Apr 13 '22 at 17:22
  • -- user isn't working.. and if I try to upgrade pip it gives me the same error and doesn't work... pip is dead. – Kovy Jacob Apr 24 '22 at 22:29
  • try `python -m pip install pandas` and if this gives you a `--user` error then try `python -m pip install --user pandas`. And if these are not working for you then let me know in the comment. – codester_09 Apr 25 '22 at 07:21