Python安装volcengine-python-sdk报错问题解决

1.问题描述

在Windows下虚拟环境中安装volcengine-python-sdk报错信息如下:

bash 复制代码
[stderr]
error: can't copy
'colcenginesdktransitrouter\models\transit_router_attachment_for_describe_transit_router_direct_connect_gateway_attachments_output.py':doesn't exist or not a regular file
hint: This usually indicates a problem with the package or the build enviroment.

2.问题分析

该报错显示,这个py文件不能正常复制到本地,因为文件不存在或不是一个正常文件。

经过分析,我本机的配置对于文件名称支持126个字符长度,而该文件名超出限制。

3.解决方案

按照以下步骤修改机器的长文件名配置(要求Windows10及以上版本,且修改后文件名最长为255个字符)。

  1. win + R 组合键;

  2. 输入 gpedit.msc;

  3. 计算机配置;

  4. 管理模版;

  5. 系统;

  6. 文件系统;

  7. 启用Win32长路径。

问题解决。