2016-10-09 60 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