1

I am trying to install CTC-Decode on a windows machine. (https://github.com/parlance/ctcdecode) I am executing the following code in Git Bash:

git clone --recursive https://github.com/parlance/ctcdecode.git cd ctcdecode && pip install .

I get the following error:

ERROR: Could not install packages due to an EnvironmentError: [('C:\Users\vtz\ctcdecode\third_party\boost_1_67_0\libs\geometry\doc\html\geometry\reference\spatial_indexes\boost__geometry__index__rtree\rtree_parameters_type_const____indexable_getter_const____value_equal_const____allocator_type_const___.html', 'C:\Users\vtz\AppData\Local\Temp\pip-req-build-tb4918ru\third_party\boost_1_67_0\libs\geometry\doc\html\geometry\reference\spatial_indexes\boost__geometry__index__rtree\rtree_parameters_type_const____indexable_getter_const____value_equal_const____allocator_type_const___.html', "[Errno 2] No such file or directory: 'C:\\Users\\vtz\\AppData\\Local\\Temp\\pip-req-build-tb4918ru\\third_party\\boost_1_67_0\\libs\\geometry\\doc\\html\\geometry\\reference\\spatial_indexes\\boost__geometry__index__rtree\\rtree_parameters_type_const____indexable_getter_const____value_equal_const____allocator_type_const___.html'")]

4

2 回答 2

0

以下在google colab中为我工作:

现在您可以导入 ctcdecode 而不会出错

于 2021-07-11T07:45:12.003 回答
0

我在通过安装时遇到了类似的问题pip,但与您不同的是,本地安装在我的情况下有效。我在这个相关的 GH 问题中添加了我的方法(为了保持一致性,我也在下面复制粘贴它)。

我认识到这更像是一个故障排除程序,而不是对您的问题的具体答案。原因是安装脚本有几个硬编码的值,它们在不同的设置中可能会有很大差异。事实上,如果你看一下上面的问题,许多不同的用户都有不同的问题,但都可能源于硬编码值的同一个问题。

出于这个原因,我不确定是否可以在不了解有关系统、依赖项等的许多详细信息的情况下判断哪个确切组合适用于给定设置,因此希望这可以帮助任何人解决问题并找到有效的组合。如果您设法使其工作,请随时分享它,这可能是对 repo 的一个很好的补充。

干杯!
安德烈斯


GH问题的答案:

就我而言(Ubuntu 20.04、Python3.7、torch 1.8), pip install 也失败了,但克隆并调用了 pip install 。回购内部工作。

要在讨论中添加一些内容,您可能有兴趣检查此 repo 中的setup.py文件,该文件基本上是安装脚本。

其中,从这里下载并安装了几个压缩库。解决您的问题的一个可能方法是用与您的设置更兼容的其他版本替换这些问题。

然后使用 g++ 命令编译库,您也可以在 setup.py 中找到该命令。另一种可能的解决方法是使该命令适应您的设置。

于 2021-04-29T14:04:10.907 回答