Unable to install pandas - file in use

Hello,

I am attempting to install pandas for a user in our environment. However, when we use the pip install pandas command, it returns that the file is in use:


Collecting pandas
  Using cached pandas-2.3.3-cp310-cp310-win_amd64.whl.metadata (19 kB)
Collecting numpy>=1.22.4 (from pandas)
  Using cached numpy-2.2.6-cp310-cp310-win_amd64.whl.metadata (60 kB)
Collecting python-dateutil>=2.8.2 (from pandas)
  Using cached python_dateutil-2.9.0.post0-py2.py3-none-any.whl.metadata (8.4 kB)
Collecting pytz>=2020.1 (from pandas)
  Using cached pytz-2025.2-py2.py3-none-any.whl.metadata (22 kB)
Collecting tzdata>=2022.7 (from pandas)
  Using cached tzdata-2025.2-py2.py3-none-any.whl.metadata (1.4 kB)
Collecting six>=1.5 (from python-dateutil>=2.8.2->pandas)
  Using cached six-1.17.0-py2.py3-none-any.whl.metadata (1.7 kB)
Downloading pandas-2.3.3-cp310-cp310-win_amd64.whl (11.3 MB)
   ━━━━━━━━━━━━━━━━╺━━━━━━━━━━━━━━━━━━━━━━━ 4.6/11.3 MB 1.1 MB/s eta 0:00:07
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\\usernamehere\\AppData\\Local\\Temp\\pip-unpack-divtfpsb\\pandas-2.3.3-cp310-cp310-win_amd64.whl'                                                                                                                                                                                                  
Check the permissions.                                                                                                                                                                                                              

Any ideas what might be occurring here? Restarts / reinstalls of PyCharm do not seem to hel, nor can I locate the referenced folder.

You have another process that has opened the .whl file.
Quit programs until the problem goes away, or reboot to get to a clean situation.

1 Like

Hello,

We have tried reboots and force quits to no avail, unfortunately.

There are Windows tools that you can use to find the process that has the file open. You will need to do a web search to find them as I do not have a recommendation off the top of my head.

Hmmm, I think I used a sysinternals tool in the past maybe?

Nieve shot in the dark here, but does this file exist, and can you delete it?

Unfortunately the path does not seem to exist when searched for in file explorer. :frowning:

Does

exist and you could delete that? Maybe try to uninstall pandas and reinstall?
It looks like you’ve tried a lot of things already. I’m by no means any kind of expert, just throwing things out there. Good luck.

1 Like

I have sometimes been able to blame anti-virus software for this kind of thing: sees a β€œdangerous looking” archive being unpacked and grabs it to scan it. Not that I would ever advise you to turn security off.

Like others, just a guess.

I’ve had issues with anti-virus running as well. I forget if I was installing or uninstalling something, but when I temporarily disabled my AV, the problem I had was resolved. I had recently changed AV software, and I didn’t get a notification that something was blocked.

Yep. I’ve had to whitelist a bunch of directories for Python and games when using a new AV. At work our IT department takes care of that. OP should try that. If a reboot didn’t solve this then maybe the AV sees a file that is suspicious and that’s where the error comes from.

Also make sure

  1. You’re installing into a project directory with an active environment.