just installed Python, getting WinError 32 for any libraries I try to install

Viewed 518

I just installed Python 3.10 on my work machine. I went to pip install pandas and got a Win32 error on a temp file within the AppData Temp Folder.I have tried with other libraries and same error. Tried to uninstall and reinstall and got the same error. Also, tried to run CMD as admin and no better.

PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: C:\\Users\\user\\AppData\\Local\\Temp\\tmp1b78532k
7 Answers

Try to restart your machiene to stop the process accessing that file or delete the file itself. This should be safe because it is temporary. And are you sure that you pip3.10 installed?

Restart your computer, Upgrade pip and try installing pandas with Unofficial Windows Binaries for Python Extension Packages or

pip install --user <package_name> --no-cache-dir

Also take a look at PermissionError: [WinError 32] The process cannot access the file because it is being used by another process.

  1. Uninstall python

  2. Delete the Lib folder in C:/User/user1/AppData/Local/Programs/Python/Python39 and C:/User/user1/AppData/Local/Programs/Python/Python310

  3. Re-install python.

you have very probably installed python as administrator therefore your account does not have permissions to do what you want. Best solution is to get winpython portable and put it in a work folder.

Restart your computer to stop the currently running process that is using the temp file. After restart clear the temps files on your system:

  1. Press windows key + R
  2. Type %temp% hit enter
  3. Select all temps files and delete them

You can then reinstall python and run the pip command and install your desired libraries.

First, restart your system - chances are that will stop whatever is accessing the temp file already. You could also delete said temp file afterwards if you want to be sure. If that fails, reinstalling Python altogether as admin should fix it.

Related