parlance / ctcdecode

PyTorch CTC Decoder bindings
MIT License
830 stars 244 forks source link

Pip install error on macOS #131

Open shamoons opened 4 years ago

shamoons commented 4 years ago

Using Python 3.6.10+ on macOS 10.15.3.

Tried:

pip install -e git+https://github.com/parlance/ctcdecode.git#egg=ctcdecode

And I get the error:

Obtaining ctcdecode from git+https://github.com/parlance/ctcdecode.git#egg=ctcdecode
  Updating /Users/shamoon/.local/share/virtualenvs/pytorch-lstm-audio-Pq4zK81J/src/ctcdecode clone
  Running command git fetch -q --tags
  Running command git reset --hard -q d4da7fa300d11cae0bc050489f8b51f4a939304d
  Running command git submodule update --init --recursive -q
Installing collected packages: ctcdecode
  Running setup.py develop for ctcdecode
    ERROR: Command errored out with exit status 1:
     command: /Users/shamoon/.local/share/virtualenvs/pytorch-lstm-audio-Pq4zK81J/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/Users/shamoon/.local/share/virtualenvs/pytorch-lstm-audio-Pq4zK81J/src/ctcdecode/setup.py'"'"'; __file__='"'"'/Users/shamoon/.local/share/virtualenvs/pytorch-lstm-audio-Pq4zK81J/src/ctcdecode/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps
         cwd: /Users/shamoon/.local/share/virtualenvs/pytorch-lstm-audio-Pq4zK81J/src/ctcdecode/
    Complete output (12 lines):
    running develop
    running egg_info
    writing ctcdecode.egg-info/PKG-INFO
    writing dependency_links to ctcdecode.egg-info/dependency_links.txt
    writing top-level names to ctcdecode.egg-info/top_level.txt
    reading manifest file 'ctcdecode.egg-info/SOURCES.txt'
    writing manifest file 'ctcdecode.egg-info/SOURCES.txt'
    running build_ext
    copying build/lib.macosx-10.15-x86_64-3.6/ctcdecode/_ext/ctc_decode.cpython-36m-darwin.so -> ctcdecode/_ext
    /Users/shamoon/.pyenv/versions/3.6-dev/lib/python3.6/distutils/extension.py:131: UserWarning: Unknown Extension options: 'package', 'with_cuda'
      warnings.warn(msg)
    error: could not create 'ctcdecode/_ext/ctc_decode.cpython-36m-darwin.so': No such file or directory
    ----------------------------------------
ERROR: Command errored out with exit status 1: /Users/shamoon/.local/share/virtualenvs/pytorch-lstm-audio-Pq4zK81J/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/Users/shamoon/.local/share/virtualenvs/pytorch-lstm-audio-Pq4zK81J/src/ctcdecode/setup.py'"'"'; __file__='"'"'/Users/shamoon/.local/share/virtualenvs/pytorch-lstm-audio-Pq4zK81J/src/ctcdecode/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps Check the logs for full command output.

I also tried with CFLAGS=-stdlib=libc++ pip3 install -e git+https://github.com/parlance/ctcdecode.git#egg=ctcdecode, but have the same error.

etemical commented 4 years ago

Did you solve this problem? How?

CracKCatZ commented 3 years ago

Hey @shamoons did you fixed your problem would be nice to know:)

WjunqiangS commented 3 years ago

Did you solve it? This problem confuse me for a long time. if you solve it, please tell me how. Thanks.