Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot install Pytorch #17

Open
lacan opened this issue Feb 2, 2024 · 1 comment
Open

Cannot install Pytorch #17

lacan opened this issue Feb 2, 2024 · 1 comment

Comments

@lacan
Copy link

lacan commented Feb 2, 2024

This is related to the same issue as
qupath/qupath-extension-wsinfer#54

On a Win11 machine, with QuPath 0.5.0 I cannot install pytorch due to a java.nio.file.AccessDeniedException

I tried running QuPath as a standard user or as an administrator, with no success...

Unable to get engine PyTorch: Failed to download PyTorch native library
ai.djl.engine.EngineException: Failed to download PyTorch native library
	at ai.djl.pytorch.jni.LibUtils.downloadPyTorch(LibUtils.java:481)
	at ai.djl.pytorch.jni.LibUtils.findNativeLibrary(LibUtils.java:292)
	at ai.djl.pytorch.jni.LibUtils.getLibTorch(LibUtils.java:92)
	at ai.djl.pytorch.jni.LibUtils.loadLibrary(LibUtils.java:80)
	at ai.djl.pytorch.engine.PtEngine.newInstance(PtEngine.java:53)
	at ai.djl.pytorch.engine.PtEngineProvider.getEngine(PtEngineProvider.java:40)
	at ai.djl.engine.Engine.getEngine(Engine.java:190)
	at qupath.ext.djl.DjlTools.getEngine(DjlTools.java:255)
	at qupath.ext.djl.ui.DjlEngineCommand.checkEngineAvailability(DjlEngineCommand.java:403)
	at qupath.ext.djl.ui.DjlEngineCommand.lambda$checkEngineStatus$7(DjlEngineCommand.java:341)
	at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.nio.file.AccessDeniedException: C:\Users\oburri\.djl.ai\pytorch\tmp8073059371695128563 -> C:\Users\oburri\.djl.ai\pytorch\2.0.1-cpu-win-x86_64
	at java.base/sun.nio.fs.WindowsException.translateToIOException(Unknown Source)
	at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
	at java.base/sun.nio.fs.WindowsFileCopy.move(Unknown Source)
	at java.base/sun.nio.fs.WindowsFileSystemProvider.move(Unknown Source)
	at java.base/java.nio.file.Files.move(Unknown Source)
	at ai.djl.util.Utils.moveQuietly(Utils.java:132)
	at ai.djl.pytorch.jni.LibUtils.downloadPyTorch(LibUtils.java:478)
	... 13 more

Any help is appreciated

@alanocallaghan
Copy link
Contributor

Sorry Oli, missed this issue when you reported it. I can't reproduce on Win10 nor Win11, and my only suggestions would've been to try changing the permissions on the folder, try elevated permissions, or try a different folder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants