【问题标题】:Python voice recognition installation errorPython语音识别安装错误
【发布时间】: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


【解决方案1】:

问题是 McAfee 防病毒软件阻止了安装。暂停 McAfee 后,安装成功完成。

:\USERS\NISARAHMED.H\APPDATA\LOCAL\PROGRAMS\PYTHON\PYTHON35-32\PYTHON.EXE
C:\USERS\NISARA~1.H\APPDATA\LOCAL\TEMP\PIP-BUILD-WPUQP6JM\SPEECHRECOGNITION\
SPEECHRECOGNITION.EGG-INFO\.DROPBOX.ATTR User-defined Rules:Dropbox Blocking
Action blocked : Create

【讨论】:

    【解决方案2】:

    您应该尝试使用 root 用户。确保您使用超级用户登录。作为: sudo pip install SpeechRecognition

    【讨论】:

    • 是的,我有管理员权限。之后我发现系统防病毒软件阻止了安装的问题。在下面找到我的答案。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2020-01-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多