1

I have Python Script where "requests" module has been imported. I am trying to execute this script in Linux terminal and getting error like

   Traceback (most recent call last):
      File "./test3.py", line 5, in <module>
        import requests
    ImportError: No module named requests

Then, I tried to install the "requests" module by running the below command on Linux terminal and getting some information as below

pip install requests
Requirement already satisfied: requests in /usr/local/lib/python2.7/site-packages

So, Please suggest me to resolve this issue.

Thanks,

Dadep
  • 2,796
  • 5
  • 27
  • 40
Kavitha
  • 185
  • 1
  • 4
  • 14
  • it sounds silly, but try uninstalling it and reinstalling it – wpercy Apr 27 '17 at 17:31
  • Hi wpercy, Thanks for the reply. But, I don't have permission to uninstall anything.. This is related to Production host.. – Kavitha Apr 27 '17 at 17:34
  • So you can install things but can't uninstall? Why not? – wpercy Apr 27 '17 at 17:34
  • the error is stating no module named requests. Make sure you know the correct name of the module. Case matters. [where-should-i-put-my-own-python-module](http://stackoverflow.com/questions/16196268/where-should-i-put-my-own-python-module-so-that-it-can-be-imported) – Mike - SMT Apr 27 '17 at 17:41
  • 2
    Maybe you have several versions of python installed. Try to check this link: http://stackoverflow.com/questions/25607837/pip-install-not-installing-into-correct-directory – Kruupös Apr 27 '17 at 18:15

0 Answers0