Graphical introduction to the steps to build a python development environment

高洛峰
Release: 2017-03-20 11:41:13
Original
1430 people have browsed it

Although there are many pythondevelopment environment construction articles on the Internet, it is still necessary to reinvent the wheel. Record the process to facilitate your own configuration in the future and to facilitate learning. Colleagues in configure their environment.

 1. Get ready to install the package

## 1) Go to the python official website to download the python operating environment (https:// www.python.org/downloads/), currently the more stable one is python-3.5.2

2) Download the latest version of IDE from the pycharm official website (http://www.jetbrains .com/pycharm/download/#section=windows), the official website provides three versions of mac, windows and linux. I downloaded pycharm-community-2016.2.3.exe 

 2. Install the software

 1) Install the python operating environment

Double-click python-3.5.2.exe

 Graphical introduction to the steps to build a python development environment

It is generally better to use customized installation, otherwise the automatic installation will install the environment into the personal directory, and sometimes it is very difficult to find it. Trouble

In addition, check the check mark in front of the second red box, otherwise you need to manually add python installation in the path of windows environmentvariable Path

 Graphical introduction to the steps to build a python development environment

 Graphical introduction to the steps to build a python development environment

Here, manually modify the installation path. You can install it to the C drive or the D drive.

## 

Graphical introduction to the steps to build a python development environment

Complete the installation

Then we open CMD and enter python in it. You can enter the encoding directly

We can enter

print('hello world!') to test the python operation, as shown below

 

Graphical introduction to the steps to build a python development environment

If you enter python, the following error appears

Graphical introduction to the steps to build a python development environment

Then you have to manually add the python installation path to the system environment variable

Open the start menu and right-click the computer = "

Attributes

Graphical introduction to the steps to build a python development environment

 Graphical introduction to the steps to build a python development environment

 Graphical introduction to the steps to build a python development environment

## Graphical introduction to the steps to build a python development environment

After selecting, click Edit and add

at the end; C:\Python\Scripts\;C:\Python\;

This is the installation path just now

Then open a new CMD (you need to open a new cmd to be effective), enter python and you can see the prompt to enter the coding interface

2) Install pycharm development IDE

Double-click pycharm-community-2016.2.3.exe, generally Just follow the normal default installation items

 Graphical introduction to the steps to build a python development environment

## 

Graphical introduction to the steps to build a python development environment

 

Graphical introduction to the steps to build a python development environment

 

Graphical introduction to the steps to build a python development environment

 

Graphical introduction to the steps to build a python development environment

Here is the selection of IDE Generally speaking, when editing the interface skin, using gray text on a black background will look less dazzling and easier on the eyes. You can also set it later after selecting it here.

The installation was successful after submission.

Chinese method

Download a Chinese package online and rename it

resources_cn.jar, and then copy it directly to the installation In the lib folder under the path, reopen the IDE and the Chinese version will be automatically restored.

If you want to cancel the Chinese version, just delete this file and reopen the IDE to automatically restore the English version.

It is recommended not to Chineseize it, because some functions cannot be used or clicked after Chineseization

 

Graphical introduction to the steps to build a python development environment

 

Graphical introduction to the steps to build a python development environment

# To configure the editing interface skin, you can configure it as follows. Generally, the font will be smaller by default, but it can also be modified to be larger according to the configuration below.

 

Graphical introduction to the steps to build a python development environment

 Graphical introduction to the steps to build a python development environment

 The list item selection here can use different skins

 Graphical introduction to the steps to build a python development environment

When using the default item, the font size cannot be modified directly. Click Save As... and you can modify it after saving as.

 Graphical introduction to the steps to build a python development environment

 Graphical introduction to the steps to build a python development environment

After saving as, you can modify it directly now

 3. Install python Kind of package

There are two ways to install the package, one is to use the command line, the other is to choose the IDE to install

 1) Command line Installation method

Open cmd, enter pip install flask (the name of the package you want to install), press Enter to start the installation

Graphical introduction to the steps to build a python development environment

 Graphical introduction to the steps to build a python development environment

Wait for a while and the installation will be successful

General We need to upgrade pip to the latest version, which can reduce the occurrence of installation problems

Enter the following command in cmd, and the pip upgrade will be started

pip install https://pypi.python.org/packages/11/b6/abcb525026a4be042b486df43905d6893fb04f05aac21c32c638e939e447/pip-9.0.1.tar.gz#md5=35f01da33009719497f01a4ba69d63c9
Copy after login


 Graphical introduction to the steps to build a python development environment

 Graphical introduction to the steps to build a python development environment

 Graphical introduction to the steps to build a python development environment

We enter: pip --version in cmd to see the current pip version

 Graphical introduction to the steps to build a python development environment

 

In case the pip upgrade fails, don’t be afraid, you can go to the python official website to download the installation package for installation and upgrade

In browsing Enter in the server address bar: https://pypi.python.org/pypi/pip

 Graphical introduction to the steps to build a python development environment

Download the installation package, And extract it to the root directory of drive C

 Graphical introduction to the steps to build a python development environment

Enter the following command under DOS, enter the pip-9.0.1 folder, and then enter: python setup.py install to enter pip installation

 Graphical introduction to the steps to build a python development environment

 Graphical introduction to the steps to build a python development environment

Complete the pip upgrade operation

 2) IDE installation method

Open the IDE and click: File => Default Settings

 Graphical introduction to the steps to build a python development environment

Then select Project Interpreter, you can see the list of installed python packages, click + in the upper right corner to enter the installation package selection interface

 Graphical introduction to the steps to build a python development environment

Enter the name of the package you want to install in the search box at the top, you can search for the installation package, then select it, click Install Package in the lower left corner, and the IDE will start downloading Installed. If the installation fails due to network reasons, you can click on other items and then click back, and then click Install. After several times, the installation can be successful. After repeated attempts, the installation still cannot be successful. You can click to view the cause of the error, or you can Use the command mode to directly see the cause of the error.

 Graphical introduction to the steps to build a python development environment

After completing the above operations, you can start developing pythont programs

The above is the detailed content of Graphical introduction to the steps to build a python development environment. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template