Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to parse the python development environment and build a tutorial

2025-04-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article will explain in detail how to parse the python development environment to build tutorials, the quality of the article content is high, so Xiaobian shared for everyone to make a reference, I hope you have a certain understanding of related knowledge after reading this article.

Next you will see Python development environment build tutorial, PC environment for Win7 64 bit.

The first step is to install Python.

1. Download python2.7, here is a Baidu connection, https://pan.baidu.com/s/1o7Mm8AI

2. Double-click the installation file to enter the installation interface, as shown below.

Click next to continue

Select install on drive c, click next to continue

Click finish to finish the installation

3. Configuration of environmental variables

Just install python version is not enough, but also configure environment variables, right-click "my computer", may also be called "computer", in short, you see the pattern is good, and then select "properties"

Click "Advanced System Settings" on the left of the image below

Click the environment variable in the red box

Note that the next thing to configure is in the system environment variables, that is, the red box area, you do not go to the user variables above to configure. In the system variables, there must be a variable named "Path". If it is really useless, select New. If it is available, select it and click "Edit".

Next, we need to add python address in this area of variable value. It should be noted that there are many addresses in this variable value. In order to distinguish them, we must add a semicolon in front of C:\Python27 to separate them. Many friends will make mistakes in this place. Either there is no semicolon, or the capital P is made into lowercase. In short, the address is written wrong. Be a little careful and don't make such a simple mistake.

After the configuration is good, click the OK button all the way, and then verify whether our configuration is correct. Some friends directly run the exe program in the figure below and think that the configuration is correct. This is not right.

The correct configuration method is to verify in cmd, but many friends do not know how to start cmd, in fact, it is very simple, you first hold down the winows key, and then hold down the R key at the same time, you can start the following program, in which enter cmd, click OK button.

windows key, that's the wave icon key.

Enter Python, click Enter, and a message similar to mine appears, indicating that Python is installed correctly and configured correctly.

Step 2: Install pip

With pip, you can easily install third-party modules, here is a Baidu download link pan.baidu.com/s/1jIjvtmI, because I don't have a Windows computer, so I have to use virtual machine when writing this tutorial, and virtual machine, my winodws only C disk, so I can only use C disk to do demonstration, the following steps, you can not completely follow my operation, but you follow my steps, there will be no error.

1. Extract the downloaded compressed package, and then put the pip-9.0.1 folder under drive C. Its structure directory is as follows

Enter cmd again, notice the command "cd.. ", this is the command to step back one layer of file directory, after two times, enter the directory of C disk, because my pip-9.0.1 is under C disk, so I have to step back to C disk directory in cmd first, if your pip-9.0.1 is placed under D disk, then you don't need to trouble like me, just type"D:", and then click Enter to enter the directory of D disk.

Next, type cd pip-9.0.1 command, enter the folder, and then type python setup.py install click Enter to install. Tutorial wrote here, I have to say more, at present, you have written a lot of commands, if there is a problem in the execution of a command, do not panic, it is likely that you wrote the wrong command, check carefully.

When the text shown in the figure below appears, it indicates that pip installation is successful.

Next, also configure ip environment variables, and configure python environment variables exactly the same way, the only thing to note is, do not confuse them, they are two different environment variables, a friend configure ip environment variables, but the python environment variables have been configured before to delete......

Note the contents in the red box. The environment variable of pip is C:\Python27\Scripts. Pay attention to the case. If you are careful enough, you will find the following contents in the Scripts directory.

Next, verify that pip is installed correctly, start cmd, enter pip list, and the interface below will show that the installation is correct.

Step 3: Install Pycharm

Here is still a Baidu cloud disk download link, pan.baidu.com/s/1bp3Swtp, after decompression there are two files to pay attention to, one is the exe installation file, one is the registration code, in the activation step will be used

Double-click the installer to enter the installation steps, click next all the way, and finally click finish to complete the installation.

The first time you start pycharm, you will encounter this interface, click ok

Click Accept

To this step you need to activate, check the radio button in the red box, remember the extracted registration code, open it and copy the contents to the blank area, and then click ok

Then you may encounter this interface, click skip directly

On this page, click on the red box

In the two red boxes below, the top is the location of the project, because my virtual machine only has C disk, so I have to choose C disk, strongly recommend you to choose another disk, file directory, you choose freely; the box below is the configuration interpreter, usually, pycharm will find python.exe, so you do not need to configure, click the create button in the lower right corner to create the project

Next you may encounter this interface, uncheck the left check box, click close on the right

Because I can't take screenshots, I have to take screenshots with my mobile phone. The effect is not good, but it can provide some assistance. My project name is 1043. Right-click on 1043. Select New. Select Directory. You can create many folders in the project. We put related scripts together. Here I have a simple name 201702.

Next, create a script, right-click 201702, select New, select Python File, the script name is hello

The script has only two lines

#coding=utf-8

print "hello world"

Right-click the blank area of the script and select Run "hello" to run the script. There will be a prompt for the result of running under pycharm.

About how to parse python development environment build tutorial shared here, I hope the above content can have some help for everyone, you can learn more knowledge. If you think the article is good, you can share it so that more people can see it.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 299

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report