This blog may not be so standard, environment and so on configuration. Just let you start writing Python directly.
There are a number of ways to configure the network.
This article represents only one way of my point of view.
Computer environment: WIN10 64-bit
First step: Download Python.
URL: https://www.python.org/downloads/windows/
Click and open, I downloaded the latest Python3.6.0 version.
After opening the interface below, depending on your computer and your condition select the version you need.
x86 is suitable for 32-bit operating systems; x86-64 is suitable for 64-bit operating systems.
web-based Installer is required to complete the installation via networking
executable Installer is an executable file (*.exe) installation
embeddable zip file Embedded version that can be integrated into other applications.
Here i download the web-based installer.
。
Click web-based Installer to save and open the. exe file.
Step Two: Click on the default installation or custom installation, I will not repeat.
After installation, as shown in the following figure
Step three: Introduction, Python's requests library.
URL: 1:https://pypi.python.org/pypi/requests#downloads
2:http://www.python-requests.org/en/master/user/install/#install
Here is an example of 1.
Download the first. WHL files with decompression software decompression, 2345 decompression can be.
After decompression, see as shown in the image above
It is OK to copy the first file to the Lib directory.
Fourth step: the final Test
Open idle.
Input code:
>>> Import Requests
>>> r=requests.get ("http://www.baidu.com")
>>> R.status_code
200
>>> r.encoding= ' Utf-8 '
>>> R.text
If shown in the figure above, the configuration is successful.