2016-10-09 59 views
1

我試圖使用TTS-沃森1.0.0安裝到我的Mac OS X塞拉利昂如下:無法安裝TTS沃森

sudo pip install tts-watson 

的安裝開始,然後 我得到這個錯誤:

error: could not create'/System/Library/Frameworks/Python.framework/Versions/2.7/share': Operation not permitted 

---------------------------------------- 
    Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/private/tmp/pip-build-NMf7OP/anyconfig/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-Asdffe-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/tmp/pip-build-NMf7OP/anyconfig/ 

請幫我弄清楚這個問題。提前致謝。

+1

我看,該項目的GitHub和PyPI中的網頁建議PIP安裝,但也許一個用戶空間通過安裝'PIP安裝--user tts-watson'可能很適合,因爲在/ System/Library路徑中創建某些內容的權限被拒絕了? – Dilettant

+0

@Dilettant我得到'成功安裝了tts-watson-1.0.0'。看起來好像一切都沒問題,但這不是我想要的:'從tts_watson.TtsWatson導入TtsWatson'並得到這個錯誤'ImportError:No module named tts_watson.TtsWatson'。有任何想法嗎? –

+0

我會檢查在成功安裝的消息中提到的文件夾,我懷疑該點針對不同的python解釋器的地方... python -v應該是非常詳細的,但是當你然後嘗試導入時,它很好地列出它試圖找到的地方...也許將它安裝的用戶文件夾添加到您的python會話中的sys.path以嘗試... – Dilettant

回答

0

問題是端口音頻。要解決這個問題,請安裝portaudio。

在Mac上,

brew install portaudio 

在Linux上,

apt-get install portaudio19-dev