Search code examples
pythonpython-2.7python-3.xvoice-recognition

Python voice recognition installation error


I am trying to install the python voice recognition library. Currently am using Python 3.5.2 and followed python speech recognition document:

I have used following steps as in the document:

  • Python 2.6, 2.7, or 3.3+ (required)
  • PyAudio 0.2.9+ (required only if you need to use microphone input, Microphone)
  • PocketSphinx (required only if you need to use the Sphinx recognizer, recognizer_instance.recognize_sphinx)
  • FLAC encoder (required only if the system is not x86-based Windows/Linux/OS X)

After that I have used below command

pip install SpeechRecognition

While installing I got the following error:

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'

Thanks in advance.


Solution

  • The problem is that McAfee antivirus blocked the installation. After pausing the McAfee, the installation completed successfully.

    :\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