Update Failed due to Permission Error On Windows

What is the problem?

ERROR: Could not install packages due to an OSError: [WinError 5] Access is denied: 'C:\Octoprint\venv\Lib\site-packages\~-apt\_wrappers.cp39-win_amd64.pyd'
Check the permissions.

What did you already try to solve it?

Restarting Server & PC, Server Is running on.

Have you tried running in safe mode?

Yes

Did running in safe mode solve the problem?

No

Systeminfo Bundle

octoprint-systeminfo-20220525133114.zip (244.2 KB)

Additional information about your setup

OctoPrint version, OctoPi version, printer, firmware, browser, operating system, ... as much data as possible

plugin_softwareupdate_console.log (162.1 KB)

Octoprint 1.7.3
Server Is Running on a windows 10 PC Not a Pi.
Ender 3 V2
Jyers V2.
Google Chrome on Both devices that i've tried updating the server using the UI.

Windows is tricky to live update since if a dependency is actively in use that needs updating it will fail as seen here. Shutdown the server, update manually (C:\OctoPrint\venv\bin\pip install -U OctoPrint)

The ~ should not be in the name of the package here. This is (as far as I know) an issue with pip and old temporary directories that it has not cleaned up. This issue has some discussion about a related problem. If you find the path in File Explorer, and delete the problem one (C:\Octoprint\venv\lib\site-packages\~-apt) then re-run the install it should work OK.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.