1

我尝试在 ubuntu 18.04 上安装 ctcdecode,但这并不容易。
首先,我将存储库克隆到我的服务器,当我“pip install”时发生错误。在克隆的根存储库中。
这是安装指南。
git clone --recursive https://github.com/parlance/ctcdecode.git
cd ctcdecode && pip install 。

这是我的错误信息

Processing /home/skgudwn34/ctcdecode
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-req-build-7zcjual1/setup.py", line 30, in <module>
        'third_party/boost_1_67_0.tar.gz')
      File "/tmp/pip-req-build-7zcjual1/setup.py", line 22, in download_extract
        tar.extractall('third_party/')
      File "/home/skgudwn34/anaconda3/envs/pytorch/lib/python3.7/tarfile.py", line 2000, in extractall
        numeric_owner=numeric_owner)
      File "/home/skgudwn34/anaconda3/envs/pytorch/lib/python3.7/tarfile.py", line 2042, in extract
        numeric_owner=numeric_owner)
      File "/home/skgudwn34/anaconda3/envs/pytorch/lib/python3.7/tarfile.py", line 2112, in _extract_member
        self.makefile(tarinfo, targetpath)
      File "/home/skgudwn34/anaconda3/envs/pytorch/lib/python3.7/tarfile.py", line 2161, in makefile
        copyfileobj(source, target, tarinfo.size, ReadError, bufsize)
      File "/home/skgudwn34/anaconda3/envs/pytorch/lib/python3.7/tarfile.py", line 247, in copyfileobj
        buf = src.read(bufsize)
      File "/home/skgudwn34/anaconda3/envs/pytorch/lib/python3.7/gzip.py", line 287, in read
        return self._buffer.read(size)
      File "/home/skgudwn34/anaconda3/envs/pytorch/lib/python3.7/_compression.py", line 68, in readinto
        data = self.read(len(byte_view))
      File "/home/skgudwn34/anaconda3/envs/pytorch/lib/python3.7/gzip.py", line 493, in read
        raise EOFError("Compressed file ended before the "
    EOFError: Compressed file ended before the end-of-stream marker was reached

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-req-build-7zcjual1/

我搜索了几天的解决方案。
许多人建议升级 setuptools,但它没有用。
我该怎么做才能解决我的问题。
请帮忙。我期待你的评论。
提前致谢。

4

1 回答 1

0

这可能是因为boost_1_67_0.tar.gz文件下载不完整,如错误消息所示:EOFError: Compressed file ended before the end-of-stream marker was reached.

我建议从这里下载 boost 文件并用完整的下载文件替换该ctcdecode/third_party/boost_1_67_0.tar.gz文件。让我知道这是否有效!

编辑:从这里openfst下载tar并替换其中的 tar 可能是值得的。third_party/

于 2021-04-02T20:55:30.593 回答