我正在尝试安装python语音识别库。目前我正在使用Python 3.5.2并遵循python speech recognition document:
我在文档中使用了以下步骤:
之后我使用了以下命令
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'
提前致谢。
答案 0 :(得分: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
答案 1 :(得分:0)
您应该尝试使用root用户。确保您已与超级用户一起登录。如: sudo pip install SpeechRecognition