Python Setup Disabling Path Length Limit Pros and Cons?

96,522

I recommend selecting that option and thereby removing the path length limit. It will potentially save you time in future on debugging an avoidable issue.

Here is an anecdote of how I came to know about it:

During the compilation of my program (C# code on a Windows machine), I started getting the following error:

error MSB3541: Files has invalid value "long\path\filename". The specified path,
  file name, or both are too long. The fully qualified file name must be less than
  260 characters, and the directory name must be less than 248 characters.

This error was not allowing me to build my project and the only apparent solution to this issue was to shorten my path/file names. Turns out that this bug is a built-in limitation in NTFS (Window's File System): Why does the 260 character path length limit exist in Windows?

After a couple of decades with the limitation built into the NTFS file system, it has finally been fixed (Unix based system did not have it) in Windows 10 (https://docs.microsoft.com/en-us/windows/desktop/FileIO/naming-a-file#maximum-path-length-limitation), but it is not enabled automatically, and needs registry (or group policy) settings to do this. The Python option allows you to disable it for Python libraries, saving you a lot of headache.

Do note that enabling this option will,

a) break compatibility of your programs on systems using older versions of Windows 10 and lower, when using long file/directory names and paths.

b) break programs on Windows 10 machines not having this option enabled, when using long file/directory names and paths.

Share:
96,522
Qwerty Qwerts
Author by

Qwerty Qwerts

Updated on July 08, 2022

Comments

  • Qwerty Qwerts
    Qwerty Qwerts almost 2 years

    I recently installed Python 3.7 and at the end of the setup, there is the option to "Disable path length limit". I don't know whether or not I should do this.

    What are the pros and cons of doing this? Just from the sound of it you should always disable it.