Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ImportError: No module named request

I am trying to install python SpeechRecognition on my machine.When i am trying to install the package as pip install SpeechRecognition. I am getting the following error.

import json, urllib.request  ImportError: No module named request 

And then i referred and installed requests as pip install requests i am i am getting Requirement already satisfied.But still i am unable to install SpeechRecognition.Please let me know what mistake i am doing.Thanks in advance

like image 688
Mulagala Avatar asked Jul 09 '14 11:07

Mulagala


People also ask

How do I fix an Importerror No module named Request?

Requests are not a built-in module (it doesn't come with the default python installation) in Python, you need to install it explicitly using the pip installer and then use it. If you are getting an error installing pip checkout pip: command not found to resolve the issue.

Is requests built in Python?

Requests is one of the most popular Python libraries that is not included with Python.


1 Answers

The SpeechRecognition library requires Python 3.3 or up:

Requirements

[...]

The first software requirement is Python 3.3 or better. This is required to use the library.

and from the Trove classifiers:

Programming Language :: Python
Programming Language :: Python :: 3
Programming Language :: Python :: 3.3
Programming Language :: Python :: 3.4

The urllib.request module is part of the Python 3 standard library; in Python 2 you'd use urllib2 here.

like image 97
Martijn Pieters Avatar answered Oct 01 '22 05:10

Martijn Pieters