Hi KNIMErs!
I built a pure-Python Extension with KAP 5.1 on Windows. When KAP attempts to create the conda environment upon its installation, it fails, however, with the following error: OS Error 2: No such file or directory
.
Thankfully, the error message also contains a hint saying that Windows Long Path support is probably deactivated on my device, which is the case. After further investigation, I discovered that some of the automatically generated file paths during the installation contain indeed more characters than the Windows API’s default path length permits (260 chars).
So far, I have come up with two possible solutions to this, but would still like to pick the community’s brains in case there are more:
-
Since I can neither influence KAP’s inner workings (and its sometimes long file/folder names) nor the guilty Python library’s deeply nested folder structure, my quick fix was to move KAP itself as close to my drive’s root directory as possible.
-
The error message itself recommended enabling Windows Long Path support in the Registry Editor as explained here: https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=registry.
While option 1 solved my problem this time, it also has its obvious limits. Option 2 may be more permanent, but I am in a corporate setting, and the users of my extension are not allowed to meddle with the registry keys…
If anyone has encountered a similar issue before, I am curious to hear how you overcame it.
Cheers!