Importing modules in Python: Import requests prompt error, the error message is described as follows:
>>>import Requeststraceback (most recent): File ' <stdin> ', line 1, <module>importerror:no mo Dule named Requests
This means that there is no module named requests, and the solution is to use PIP install requests for automatic installation at the command line
To switch to the root user in Ubuntu, install using the above command:
[Email protected]:/home/ubuntu/Desktop/jpg# pip install requests
The program "Pip" is not installed. You can use the command to install:
Apt-get Install Python-pip
At this point, the PIP command is not installed, this is a good solution, typing the above command can install the PIP command 650) this.width=650; "Src=" http://s3.51cto.com/wyfs02/M00/84/15/ Wkiom1ee3lhg27i0aad-gj63tqm858.png-wh_500x0-wm_3-wmp_4-s_4003521227.png "title=" installation process "alt=" Wkiom1ee3lhg27i0aad-gj63tqm858.png-wh_50 "/>
When the installation process is complete, the problem can be resolved. Verify that you are typing in the python interactive environment:
Import requests
No prompt error, problem solved!
Solution of import requests error in Python environment in Ubuntu (learning process problem record)