Common pitfalls#

Using long paths on Windows#

Windows API historically supports paths up to 260 characters. While it’s now possible to used longer ones, there are still limitations related to that.

libmamba internally relies on \\?\ prefixing to handle such paths. If you get error messages advertising such prefix, please have look at the following steps:

Long paths support has to be activated#

source: Robocorp troubleshooting documentation

  1. Open the Local Group Policy Editor application: - Start –> type gpedit.msc –> Enter:

  2. Navigate to Computer Configuration > Administrative Templates > System > Filesystem. On the right, find the “Enable win32 long paths” item and double-click it

  3. Change the setting to Enabled

  4. Exit the Local Group Policy Editor and restart your computer (or sign out and back in) to allow the changes to finish

If the problem persists after those steps, try the following:

  1. Open the Registry Editor application: - Start –> type regedit.msc and press Enter:

  2. Navigate to HKEY-LOCAL-MACHINE > SYSTEM > CurrentControlSet > Control > FileSystem. On the right, find the LongPathsEnabled item and double-click it

  3. Change the Value data: to 1

  4. Exit the Registry Editor

cmd.exe does not support calls to long prefixes#

While cmd.exe shell support long paths prefixing for directory operations such as dir, it doesn’t allow to call an executable or a batch file located at a long path prefix.

Thus, the following cases will fail:

  • completely

    • calling executables located at long prefixes

    • installation of packages with pre/post linking or activation .bat scripts

  • partially

    • pre-compilation of noarch packages, with no impact on capability to use the package but removing it will let artifacts (pycache) on the filesystem