12

According to this article, when you install Python 3.6 on Windows, the last screen of the installer looks like this:

enter image description here

I recently had some trouble with long pathnames in Windows, so I was looking for the "Disable path length limit" option in this screen. I installed Python 3.7 on Windows 10, but the "Disable path length limit" option was not visible. The Python documentation says nothing about this option.

How can I get this option to appear? Or is it no longer an option in v3.7?

Hobbes
  • 1,964
  • 3
  • 18
  • 35

5 Answers5

14

I just updated Python to 3.7.2 and was not prompted and did not remember if I had set MAX_PATH over ride so with regedit navigate to...

Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem LongPathsEnabled

If data value is 1 (true) then it is set and Python updates will not ask again. If 0 (false) then you can change the value in regedit to 1 and you are good to go. [win10]

user10855154
  • 141
  • 1
  • 2
9

This is not python (or python installer) setting, but a NTFS filesystem limitation. It can be disabled in windows system settings. See this article, or this if you feel advanced enough to manually modify windows registry.

running.t
  • 5,329
  • 3
  • 32
  • 50
  • 2
    I'm aware that it's a filesystem limitation. But apparently some Python installers will offer to remove that limitation for you. I'm trying to find out under which circumstances the option appears in the installer. – Hobbes Jun 25 '18 at 12:24
4

I just ran that installer, and was shown that option. After applying that change, the option disappeared. It's possible that, if the max path length has already been changed, then the option to do so won't be shown.

1

My guess is that you already disabled the limit.

Teejay
  • 7,210
  • 10
  • 45
  • 76
0

Apparently, you only get this option if you start the Installer with admin privileges.

If you start the installer with a non-admin account, it will:

  • install Python in that user's directory instead of C:\Program Files
  • not prompt for the "disable path length limit" option

So if you accidentally installed Python with a non-admin account and want to disable the path length limit, you can either:

  • re-run the installer with an admin account
  • directly modify the registry key "Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem\LongPathsEnabled" and set its value to 1

Both of these require admin privileges.

Frank Schmitt
  • 30,195
  • 12
  • 73
  • 107