无法安装taipy:构建taipy-templates wheel失败求助
问题描述
我尝试通过以下步骤在命令提示符中创建新环境并安装Taipy:
conda create -n taipy_env python=3.11conda activate taipy_envpip install taipy
安装时出现如下错误:
Building wheels for collected packages: taipy-templates Building wheel for taipy-templates (pyproject.toml) ... error error: subprocess-exited-with-error × Building wheel for taipy-templates (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [128 lines of output] running bdist_wheel running build running build_py creating build creating build\lib creating build\lib\taipy copying build\lib\taipy\templates\scenario-management\{{cookiecutter.__root_folder_name}}\pages\scenario_page\data_node_management.py -> build\bdist.win-amd64\wheel\.\taipy\templates\scenario-management\{{cookiecutter.__root_folder_name}}\pages\scenario_page error: could not create 'build\bdist.win-amd64\wheel\.\taipy\templates\scenario-management\{{cookiecutter.__root_folder_name}}\pages\scenario_page\data_node_management.py': No such file or directory [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for taipy-templates Failed to build taipy-templates ERROR: Could not build wheels for taipy-templates, which is required to install pyproject.toml-based projects
已尝试以下修复但无效:
- 降级Python版本
- 升级pip版本
- 安装最新版Pyarrow
解决方案
1. 使用conda-forge安装Taipy
跳过pip构建wheel的环节,直接用conda安装:
conda activate taipy_env conda install -c conda-forge taipy
2. 安装预构建wheel包
下载对应Windows Python3.11版本的Taipy预构建wheel文件,本地执行安装:
pip install 本地wheel文件路径
3. 启用Windows长路径支持
错误可能源于路径过长导致无法创建文件,启用长路径:
- 打开注册表编辑器,导航到
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem - 将
LongPathsEnabled的DWORD值改为1(无该值则新建) - 重启电脑后重新执行
pip install taipy
4. 使用短路径虚拟环境
创建环境时指定短路径,避免嵌套过长:
conda create -p C:\taipy_env python=3.11 conda activate C:\taipy_env pip install taipy
内容的提问来源于stack exchange,提问作者Panupong Jindarat
相关产品推荐
相关产品推荐

