Preparing a Python Development Environment
Scenario
OCR Python SDK supports Windows, Linux, and Mac operating systems. This section uses Windows as an example to describe how to configure the environment. Table 1 describes the required operating environment.
Procedure
The following describes how to install and configure Python 2.7 in the Windows 7 environment. If you have installed Python 2.7 or later and requests 2.18.2, skip this section.
- Download your desired Python installation package from https://www.python.org/downloads/release/python-2711/
- After the Python installation package is downloaded, install it as prompted. The default path is C:\Python27.
- Right-click Computer, choose Properties > Advanced System Settings > Environment Variables. Add C:\Python27;C:\Python27\Scripts to Path.
- Open the command line interface (CLI) and run python –v. If the information shown in Figure 1 is displayed, the configuration is successful.
- Run the following command in the new CMD window of PIP to install the requests package:
1
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple requests --trusted-host https://pypi.tuna.tsinghua.edu.cn/simple
- After the installation is complete, run the PIP command to check whether the requests package is correctly installed. See Figure 2.
Last Article: Preparing a Java Development Environment
Next Article: Preparing an iOS Development Environment


Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.