Note:
The current environment is in windows
The python version is python 3.4.
At the beginning of learning python, while reading a book while reading the forum interested in the code, http://www.oschina.net/code/snippet_1406266_43470 code running error and solution.
1. ImportError: No module named 'requests'
Traceback (most recent call last ): File "piece_full_down_image.py", line 2, in <module> Import requests ImportError: No module named 'requests' The requests module cannot be found. There are two solutions: automatically install the third-party requests module and manually download and install the requests module. Automatic installation:
When python is installed and the path of python is configured to path, you can directly call pip install requests under cmd for automatic installation. Use the pip uninstall requests command if you want to delete the file. Manual installation: Download the requests installation package in the https://pypi.python.org/pypi/requests#downloads. Third-party Python modules usually contain the setup. py file. In Windows, you only need to use the command Cd c: \ Temp \ foo Python setup. py install You can install the third-party module by using the two commands. The first cd command switches the current directory to the Directory of the third-party module to be installed (assume that the unzipped Directory of the third-party module is c: \ Temp \ foo ), the second command is executed and installed. The "ImportError: No module named setuptools" error message may appear during the installation process. This is a common error message for new users. Don't worry, this is because the setuptools module is not installed by default in Python in Windows, which is also a third-party module. Http://pypi.python.org/pypi/setuptools.
|
ImportError: No module named 'requests'