Skip to content

Cannot install Pytorch #17

@lacan

Description

@lacan

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions