microsoftgraph / msgraph-sdk-python-core

Microsoft Graph client library for Python
MIT License
261 stars 38 forks source link

Unable to install msgraph-sdk: path too long #338

Open alegrigoriev opened 1 year ago

alegrigoriev commented 1 year ago

Environment

Describe the bug

msgraph-sdk install fails because path is too long.

To Reproduce

pip install msgraph-sdk

Expected behavior

Installation must succeed

Screenshots

User-local installation fails:

ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: 'C:\\Users\\agrigoriev\\AppData\\Roaming\\Python\\Python310\\site-packages\\msgraph\\generated\\communications\\call_records\\microsoft_graph_call_records_get_direct_routing_calls_with_from_date_time_with_to_date_time\\get_direct_routing_calls_with_from_date_time_with_to_date_time_response.py' HINT: This error might have occurred since this system does not have Windows Long Path support enabled. You can find information on how to enable this at https://pip.pypa.io/warnings/enable-long-paths

Global installation also fails:

ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: 'C:\\Python310\\Lib\\site-packages\\msgraph\\generated\\communications\\call_records\\microsoft_graph_call_records_get_direct_routing_calls_with_from_date_time_with_to_date_time\\microsoft_graph_call_records_get_direct_routing_calls_with_from_date_time_with_to_date_time_request_builder.py'

Additional context

Consider compacting the generated names. Enabling Windows Long Path may not always be feasible.

samvv commented 7 months ago

This is biting me, too. Is there any workaround? I'm trying to get this to run on Windows Server 2008 and Python 3.8.

Galleleo commented 7 months ago

Same problem here. Win 10, no admin rights so it's impossible to edit the registry. Please change the name of the "microsoft_graph_call_records_get_direct_routing_calls_with_from_date_time_with_to_date_time_request_builder.py" file

nateGeorge commented 3 months ago

Same problem here as well, tried using subst to shorten the path but it's still not enough. Also tried installing all the older versions to no avail.

averenix commented 1 month ago

This affects Azure Automation - trying to install msgraph-sdk as a python module for a Python v3.8 environment returns this error.

Works fine with a Python v3.10 Azure Automation environment. Python v3.10 is in preview though and not recommended by Microsoft.