【发布时间】:2017-01-06 11:51:19
【问题描述】:
我正在尝试安装 python 语音识别库。目前正在使用 Python 3.5.2 并关注python speech recognition document:
我使用了文档中的以下步骤:
- Python 2.6、2.7 或 3.3+(必需)
- PyAudio 0.2.9+(仅当您需要使用麦克风输入时才需要,麦克风)
- PocketSphinx(仅当您需要使用 Sphinx 识别器时才需要,recognizer_instance.recognize_sphinx)
- FLAC 编码器(仅当系统不是基于 x86 时才需要 Windows/Linux/OS X)
之后我使用了下面的命令
pip install SpeechRecognition
安装时出现以下错误:
Exception:
Traceback (most recent call last):
File "c:\users\nisarahmed.h\appdata\local\programs\python\python35-32\lib\site
-packages\pip\basecommand.py", line 215, in main
status = self.run(options, args)
File "c:\users\nisarahmed.h\appdata\local\programs\python\python35
32\lib\site
-packages\pip\commands\install.py", line 335, in run
wb.build(autobuilding=True)
File "c:\users\nisarahmed.h\appdata\local\programs\python\python35-32\lib\site
-packages\pip\wheel.py", line 749, in build
self.requirement_set.prepare_files(self.finder)
File "c:\users\nisarahmed.h\appdata\local\programs\python\python35-32\lib\site
-packages\pip\req\req_set.py", line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "c:\users\nisarahmed.h\appdata\local\programs\python\python35-32\lib\site
-packages\pip\req\req_set.py", line 620, in _prepare_file
session=self.session, hashes=hashes)
File "c:\users\nisarahmed.h\appdata\local\programs\python\python35-32\lib\site
-packages\pip\download.py", line 821, in unpack_url
hashes=hashes
File "c:\users\nisarahmed.h\appdata\local\programs\python\python35-32\lib\site
-packages\pip\download.py", line 663, in unpack_http_url
unpack_file(from_path, location, content_type, link)
File "c:\users\nisarahmed.h\appdata\local\programs\python\python35-32\lib\site
-packages\pip\utils\__init__.py", line 605, in unpack_file
untar_file(filename, location)
File "c:\users\nisarahmed.h\appdata\local\programs\python\python35-32\lib\site
-packages\pip\utils\__init__.py", line 577, in untar_file
with open(path, 'wb') as destfp:
PermissionError: [Errno 13] Permission denied:
'C:\\Users\\NISARA~1.H\\AppData\\
Local\\Temp\\pip-build-zjx5yab7\\SpeechRecognition\\SpeechRecognition.egg-info/.
dropbox.attr'
提前致谢。
【问题讨论】:
-
听起来问题可能与此类似:stackoverflow.com/q/31172719/2677943
-
我试过了,得到同样的错误
-
这对我有用:
sudo python -m pip install SpeechRecognition -
@YanKingYin 杀毒相关问题。停止运行防病毒软件后,相同的代码对我有用。
标签: python python-2.7 python-3.x voice-recognition