msgraph-sdk-python-core icon indicating copy to clipboard operation
msgraph-sdk-python-core copied to clipboard

Unable to install msgraph-sdk: path too long

Open alegrigoriev opened this issue 2 years ago • 4 comments

Environment

  • Python Version: Python 3.10
  • msgraph-core version:
  • OS: Windows 10

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.

alegrigoriev avatar Sep 17 '23 13:09 alegrigoriev

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.

samvv avatar Feb 05 '24 09:02 samvv

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

Galleleo avatar Feb 19 '24 10:02 Galleleo

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.

nateGeorge avatar Jun 17 '24 22:06 nateGeorge

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.

averenix avatar Aug 15 '24 03:08 averenix

Mildly annoying bug, especially since the workaround with enabling long file paths is awkward to automate since none of the widely used package management tools allow to hook into the pre-install phase where potential issues could be detected.

thaDude avatar Dec 02 '24 14:12 thaDude

this still isn't fixed...can you guys just not use long paths?

budaesandrei avatar Jan 15 '25 23:01 budaesandrei

The issue was that the paths inside this SDK are too long; that's not something we can control.

-------- Original Message -------- On 1/16/25 00:27, budaesandrei wrote:

this still isn't fixed...can you guys just not use long paths?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

samvv avatar Jan 16 '25 10:01 samvv

Hi everyone, Thank you for your patience.

I'm going to go ahead and close this issue as a duplicate of https://github.com/microsoftgraph/msgraph-sdk-python/issues/234 please subscribe to that issue if you want to be updated here.

baywet avatar Jan 20 '25 17:01 baywet