Python3.6 installation and introduction of requests library __python

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.