twilio-python icon indicating copy to clipboard operation
twilio-python copied to clipboard

Pip install sometimes fails on windows systems with 260 character path limit

Open rcxdude opened this issue 6 years ago • 3 comments

Issue Summary

pip install will sometimes fail on windows due to long paths, if the path limit is not disabled. Due to a combination of long paths in a CI build or long paths for e.g. the Windows store version of python and long paths in the package, the installer may attempt create files with a path over 260 characters and fail. I think this was one of the issues encountered by the reporter in #510

Steps to Reproduce

Installing on windows 10, python 3.6, pip 20.2, 6.44.1 without character path limit disabled.

pip install twilio

Code Snippet

# paste code here

Exception/Log

byte-compiling c:\users\administrator\desktop\builds\ercp-8uu\0\xxxxxxxxxxxxxxxxxxx\yyyyyyyyyyyyyyyyy\env\Lib\site-packages\twilio\rest\api\v2010\account\sip\domain\auth_types\auth_registrations_mapping\auth_registrations_credential_list_mapping.py to auth_registrations_credential_list_mapping.cpython-36.pyc
    error: [Errno 2] No such file or directory: 'c:\\users\\administrator\\desktop\\builds\\ercp-8uu\\0\\xxxxxxxxxxxxxxxxxxx\\yyyyyyyyyyyyyyyyy\\env\\Lib\\site-packages\\twilio\\rest\\api\\v2010\\account\\sip\\domain\\auth_types\\auth_registrations_mapping\\__pycache__\\auth_registrations_credential_list_mapping.cpython-36.pyc.50728064'

Technical details:

  • twilio-python version:
  • python version:

Workaround

Disabling the path limit in Windows or using an install location in a shorter path resolves the issue, however, it would be at least worth a better error message in this case.

rcxdude avatar Aug 02 '20 17:08 rcxdude

I think this is a good candidate to add to the install docs.

This issue has been added to our internal backlog to be prioritized. Pull requests and +1s on the issue summary will help it move up the backlog.

childish-sambino avatar Aug 03 '20 16:08 childish-sambino

can I work on it?

hack3r-0m avatar Oct 01 '20 09:10 hack3r-0m

I just ran into this issue. For those looking for a fix here's what I did.

1.In Registry Editor navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem

  1. Find - LongPathsEnabled dword

  2. Change Value to 1 1 = Enable

Jediguy avatar Jul 06 '21 17:07 Jediguy